diff --git a/.changelog/0442dda1591d47f689f3d697023d5000.json b/.changelog/0442dda1591d47f689f3d697023d5000.json new file mode 100644 index 00000000000..120a0319814 --- /dev/null +++ b/.changelog/0442dda1591d47f689f3d697023d5000.json @@ -0,0 +1,8 @@ +{ + "id": "0442dda1-591d-47f6-89f3-d697023d5000", + "type": "documentation", + "description": "Documentation updates for the AWS Identity and Access Management API Reference.", + "modules": [ + "service/iam" + ] +} \ No newline at end of file diff --git a/.changelog/06c86f44c9404e3ca7e94a9a50c45423.json b/.changelog/06c86f44c9404e3ca7e94a9a50c45423.json new file mode 100644 index 00000000000..1140e1c3148 --- /dev/null +++ b/.changelog/06c86f44c9404e3ca7e94a9a50c45423.json @@ -0,0 +1,8 @@ +{ + "id": "06c86f44-c940-4e3c-a7e9-4a9a50c45423", + "type": "documentation", + "description": "Documentation update to address tickets.", + "modules": [ + "service/ecs" + ] +} \ No newline at end of file diff --git a/.changelog/126398fdc7c542f191eb19aeb6512e2e.json b/.changelog/126398fdc7c542f191eb19aeb6512e2e.json new file mode 100644 index 00000000000..f2b81c9e22c --- /dev/null +++ b/.changelog/126398fdc7c542f191eb19aeb6512e2e.json @@ -0,0 +1,8 @@ +{ + "id": "126398fd-c7c5-42f1-91eb-19aeb6512e2e", + "type": "feature", + "description": "Add UnprocessedDataSources to CreateDetectorResponse which specifies the data sources that couldn't be enabled during the CreateDetector request. In addition, update documentations.", + "modules": [ + "service/guardduty" + ] +} \ No newline at end of file diff --git a/.changelog/1cb9c674b6324501ba8bdd7788488b31.json b/.changelog/1cb9c674b6324501ba8bdd7788488b31.json new file mode 100644 index 00000000000..8a87175b4ee --- /dev/null +++ b/.changelog/1cb9c674b6324501ba8bdd7788488b31.json @@ -0,0 +1,8 @@ +{ + "id": "1cb9c674-b632-4501-ba8b-dd7788488b31", + "type": "feature", + "description": "AWS Elemental MediaLive now supports forwarding SCTE-35 messages through the Event Signaling and Management (ESAM) API, and can read those SCTE-35 messages from an inactive source.", + "modules": [ + "service/medialive" + ] +} \ No newline at end of file diff --git a/.changelog/2175dc2131d44ee79e52dd37b5dcecbe.json b/.changelog/2175dc2131d44ee79e52dd37b5dcecbe.json new file mode 100644 index 00000000000..2e4037fb594 --- /dev/null +++ b/.changelog/2175dc2131d44ee79e52dd37b5dcecbe.json @@ -0,0 +1,8 @@ +{ + "id": "2175dc21-31d4-4ee7-9e52-dd37b5dcecbe", + "type": "documentation", + "description": "Doc update to reflect no support for schema parameter on BatchExecuteStatement API", + "modules": [ + "service/rdsdata" + ] +} \ No newline at end of file diff --git a/.changelog/37fd0edbb048465d92de62e40952e681.json b/.changelog/37fd0edbb048465d92de62e40952e681.json new file mode 100644 index 00000000000..897d73ded2e --- /dev/null +++ b/.changelog/37fd0edbb048465d92de62e40952e681.json @@ -0,0 +1,8 @@ +{ + "id": "37fd0edb-b048-465d-92de-62e40952e681", + "type": "feature", + "description": "Update RelatedItem enum to support Tasks", + "modules": [ + "service/ssmincidents" + ] +} \ No newline at end of file diff --git a/.changelog/3e6862c475ff4e8e8014a94605ee0a98.json b/.changelog/3e6862c475ff4e8e8014a94605ee0a98.json new file mode 100644 index 00000000000..a160adb17cf --- /dev/null +++ b/.changelog/3e6862c475ff4e8e8014a94605ee0a98.json @@ -0,0 +1,8 @@ +{ + "id": "3e6862c4-75ff-4e8e-8014-a94605ee0a98", + "type": "feature", + "description": "With this update, you can choose which Salesforce API is used by Amazon AppFlow to transfer data to or from your Salesforce account. You can choose the Salesforce REST API or Bulk API 2.0. You can also choose for Amazon AppFlow to pick the API automatically.", + "modules": [ + "service/appflow" + ] +} \ No newline at end of file diff --git a/.changelog/88605197697441a09975538d795dea2d.json b/.changelog/88605197697441a09975538d795dea2d.json new file mode 100644 index 00000000000..7ce5637e43c --- /dev/null +++ b/.changelog/88605197697441a09975538d795dea2d.json @@ -0,0 +1,8 @@ +{ + "id": "88605197-6974-41a0-9975-538d795dea2d", + "type": "feature", + "description": "This release adds support for a secondary email and a mobile number for Amazon Connect instance users.", + "modules": [ + "service/connect" + ] +} \ No newline at end of file diff --git a/.changelog/97de10a3403442e49e8efb5a08301854.json b/.changelog/97de10a3403442e49e8efb5a08301854.json new file mode 100644 index 00000000000..9904e913ae4 --- /dev/null +++ b/.changelog/97de10a3403442e49e8efb5a08301854.json @@ -0,0 +1,8 @@ +{ + "id": "97de10a3-4034-42e4-9e8e-fb5a08301854", + "type": "feature", + "description": "Support of AmazonLinux2022 by Patch Manager", + "modules": [ + "service/ssm" + ] +} \ No newline at end of file diff --git a/.changelog/99d0f7b105ca4272a118c86e0c2a46c7.json b/.changelog/99d0f7b105ca4272a118c86e0c2a46c7.json new file mode 100644 index 00000000000..30adcb2b623 --- /dev/null +++ b/.changelog/99d0f7b105ca4272a118c86e0c2a46c7.json @@ -0,0 +1,8 @@ +{ + "id": "99d0f7b1-05ca-4272-a118-c86e0c2a46c7", + "type": "documentation", + "description": "This release enables customers to specify multiple target languages in asynchronous batch translation requests.", + "modules": [ + "service/translate" + ] +} \ No newline at end of file diff --git a/.changelog/c06e35adf501481e8412f8b792bb5ec9.json b/.changelog/c06e35adf501481e8412f8b792bb5ec9.json new file mode 100644 index 00000000000..db34739a2fe --- /dev/null +++ b/.changelog/c06e35adf501481e8412f8b792bb5ec9.json @@ -0,0 +1,8 @@ +{ + "id": "c06e35ad-f501-481e-8412-f8b792bb5ec9", + "type": "feature", + "description": "This release updates the GetRecommendations API to include a trigger event list for classifying and grouping recommendations.", + "modules": [ + "service/wisdom" + ] +} \ No newline at end of file diff --git a/.changelog/d1bdda2085464a05a4d2bb30a27e0d2a.json b/.changelog/d1bdda2085464a05a4d2bb30a27e0d2a.json new file mode 100644 index 00000000000..150e395c9a2 --- /dev/null +++ b/.changelog/d1bdda2085464a05a4d2bb30a27e0d2a.json @@ -0,0 +1,8 @@ +{ + "id": "d1bdda20-8546-4a05-a4d2-bb30a27e0d2a", + "type": "documentation", + "description": "Documentation update for AWS IoT FleetWise", + "modules": [ + "service/iotfleetwise" + ] +} \ No newline at end of file diff --git a/.changelog/d4397d3e2c5442959c2f8b03bdbf2f83.json b/.changelog/d4397d3e2c5442959c2f8b03bdbf2f83.json new file mode 100644 index 00000000000..3952834258d --- /dev/null +++ b/.changelog/d4397d3e2c5442959c2f8b03bdbf2f83.json @@ -0,0 +1,8 @@ +{ + "id": "d4397d3e-2c54-4295-9c2f-8b03bdbf2f83", + "type": "feature", + "description": "Pause and resume camera stream processing with SignalApplicationInstanceNodeInstances. Reboot an appliance with CreateJobForDevices. More application state information in DescribeApplicationInstance response.", + "modules": [ + "service/panorama" + ] +} \ No newline at end of file diff --git a/.changelog/dc13258b0631427d92136ced203fe0b8.json b/.changelog/dc13258b0631427d92136ced203fe0b8.json new file mode 100644 index 00000000000..b4228f8007f --- /dev/null +++ b/.changelog/dc13258b0631427d92136ced203fe0b8.json @@ -0,0 +1,8 @@ +{ + "id": "dc13258b-0631-427d-9213-6ced203fe0b8", + "type": "feature", + "description": "We are releasing the ability for fields to be configured as arrays.", + "modules": [ + "service/amplifyuibuilder" + ] +} \ No newline at end of file diff --git a/.changelog/e12b0c1f0d4446c5bf3b3ce79c301751.json b/.changelog/e12b0c1f0d4446c5bf3b3ce79c301751.json new file mode 100644 index 00000000000..fda0abb70c5 --- /dev/null +++ b/.changelog/e12b0c1f0d4446c5bf3b3ce79c301751.json @@ -0,0 +1,8 @@ +{ + "id": "e12b0c1f-0d44-46c5-bf3b-3ce79c301751", + "type": "feature", + "description": "This release adds SPEKE v2 support for MediaPackage VOD. Speke v2 is an upgrade to the existing SPEKE API to support multiple encryption keys, based on an encryption contract selected by the customer.", + "modules": [ + "service/mediapackagevod" + ] +} \ No newline at end of file diff --git a/.changelog/eb33e524a1014d768e783a7c9a651a11.json b/.changelog/eb33e524a1014d768e783a7c9a651a11.json new file mode 100644 index 00000000000..0f12bcd5849 --- /dev/null +++ b/.changelog/eb33e524a1014d768e783a7c9a651a11.json @@ -0,0 +1,8 @@ +{ + "id": "eb33e524-a101-4d76-8e78-3a7c9a651a11", + "type": "feature", + "description": "This release adds an option for customers to configure workflows that are triggered when files are only partially received from a client due to premature session disconnect.", + "modules": [ + "service/transfer" + ] +} \ No newline at end of file diff --git a/.changelog/f372c904760b485488f4972011089ba8.json b/.changelog/f372c904760b485488f4972011089ba8.json new file mode 100644 index 00000000000..3a2e12ea69e --- /dev/null +++ b/.changelog/f372c904760b485488f4972011089ba8.json @@ -0,0 +1,8 @@ +{ + "id": "f372c904-760b-4854-88f4-972011089ba8", + "type": "feature", + "description": "This release adds support for describing and updating AWS Managed Microsoft AD set up.", + "modules": [ + "service/directoryservice" + ] +} \ No newline at end of file diff --git a/service/amplifyuibuilder/deserializers.go b/service/amplifyuibuilder/deserializers.go index 2a42766d4db..a6726d619fe 100644 --- a/service/amplifyuibuilder/deserializers.go +++ b/service/amplifyuibuilder/deserializers.go @@ -4988,6 +4988,15 @@ func awsRestjson1_deserializeDocumentFieldInputConfig(v **types.FieldInputConfig sv.DescriptiveText = ptr.String(jtv) } + case "isArray": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.IsArray = ptr.Bool(jtv) + } + case "maxValue": if value != nil { switch jtv := value.(type) { diff --git a/service/amplifyuibuilder/serializers.go b/service/amplifyuibuilder/serializers.go index fffec025306..66240f32f74 100644 --- a/service/amplifyuibuilder/serializers.go +++ b/service/amplifyuibuilder/serializers.go @@ -2646,6 +2646,11 @@ func awsRestjson1_serializeDocumentFieldInputConfig(v *types.FieldInputConfig, v ok.String(*v.DescriptiveText) } + if v.IsArray != nil { + ok := object.Key("isArray") + ok.Boolean(*v.IsArray) + } + if v.MaxValue != nil { ok := object.Key("maxValue") switch { diff --git a/service/amplifyuibuilder/types/types.go b/service/amplifyuibuilder/types/types.go index dc54f661e22..801fff4ca7f 100644 --- a/service/amplifyuibuilder/types/types.go +++ b/service/amplifyuibuilder/types/types.go @@ -599,6 +599,10 @@ type FieldInputConfig struct { // The text to display to describe the field. DescriptiveText *string + // Specifies whether to render the field as an array. This property is ignored if + // the dataSourceType for the form is a Data Store. + IsArray *bool + // The maximum value to display for the field. MaxValue *float32 @@ -783,7 +787,7 @@ type FormButton struct { noSmithyDocumentSerde } -// Describes the call to action button configuration for the form.. +// Describes the call to action button configuration for the form. type FormCTA struct { // Displays a cancel button. diff --git a/service/appflow/deserializers.go b/service/appflow/deserializers.go index e7b1695f9db..637a40eb86c 100644 --- a/service/appflow/deserializers.go +++ b/service/appflow/deserializers.go @@ -9296,6 +9296,42 @@ func awsRestjson1_deserializeDocumentSalesforceConnectorProfileProperties(v **ty return nil } +func awsRestjson1_deserializeDocumentSalesforceDataTransferApiList(v *[]types.SalesforceDataTransferApi, 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.SalesforceDataTransferApi + if *v == nil { + cv = []types.SalesforceDataTransferApi{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.SalesforceDataTransferApi + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SalesforceDataTransferApi to be of type string, got %T instead", value) + } + col = types.SalesforceDataTransferApi(jtv) + } + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentSalesforceDestinationProperties(v **types.SalesforceDestinationProperties, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -9318,6 +9354,15 @@ func awsRestjson1_deserializeDocumentSalesforceDestinationProperties(v **types.S for key, value := range shape { switch key { + case "dataTransferApi": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SalesforceDataTransferApi to be of type string, got %T instead", value) + } + sv.DataTransferApi = types.SalesforceDataTransferApi(jtv) + } + case "errorHandlingConfig": if err := awsRestjson1_deserializeDocumentErrorHandlingConfig(&sv.ErrorHandlingConfig, value); err != nil { return err @@ -9377,6 +9422,11 @@ func awsRestjson1_deserializeDocumentSalesforceMetadata(v **types.SalesforceMeta for key, value := range shape { switch key { + case "dataTransferApis": + if err := awsRestjson1_deserializeDocumentSalesforceDataTransferApiList(&sv.DataTransferApis, value); err != nil { + return err + } + case "oAuthScopes": if err := awsRestjson1_deserializeDocumentOAuthScopeList(&sv.OAuthScopes, value); err != nil { return err @@ -9413,6 +9463,15 @@ func awsRestjson1_deserializeDocumentSalesforceSourceProperties(v **types.Salesf for key, value := range shape { switch key { + case "dataTransferApi": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SalesforceDataTransferApi to be of type string, got %T instead", value) + } + sv.DataTransferApi = types.SalesforceDataTransferApi(jtv) + } + case "enableDynamicFieldUpdate": if value != nil { jtv, ok := value.(bool) diff --git a/service/appflow/serializers.go b/service/appflow/serializers.go index db0016b0caf..2b0dc768559 100644 --- a/service/appflow/serializers.go +++ b/service/appflow/serializers.go @@ -3330,6 +3330,11 @@ func awsRestjson1_serializeDocumentSalesforceDestinationProperties(v *types.Sale object := value.Object() defer object.Close() + if len(v.DataTransferApi) > 0 { + ok := object.Key("dataTransferApi") + ok.String(string(v.DataTransferApi)) + } + if v.ErrorHandlingConfig != nil { ok := object.Key("errorHandlingConfig") if err := awsRestjson1_serializeDocumentErrorHandlingConfig(v.ErrorHandlingConfig, ok); err != nil { @@ -3361,6 +3366,11 @@ func awsRestjson1_serializeDocumentSalesforceSourceProperties(v *types.Salesforc object := value.Object() defer object.Close() + if len(v.DataTransferApi) > 0 { + ok := object.Key("dataTransferApi") + ok.String(string(v.DataTransferApi)) + } + if v.EnableDynamicFieldUpdate { ok := object.Key("enableDynamicFieldUpdate") ok.Boolean(v.EnableDynamicFieldUpdate) diff --git a/service/appflow/types/enums.go b/service/appflow/types/enums.go index fc57c2298eb..8428de20059 100644 --- a/service/appflow/types/enums.go +++ b/service/appflow/types/enums.go @@ -544,6 +544,7 @@ const ( OperatorPropertiesKeysConcatFormat OperatorPropertiesKeys = "CONCAT_FORMAT" OperatorPropertiesKeysSubfieldCategoryMap OperatorPropertiesKeys = "SUBFIELD_CATEGORY_MAP" OperatorPropertiesKeysExcludeSourceFieldsList OperatorPropertiesKeys = "EXCLUDE_SOURCE_FIELDS_LIST" + OperatorPropertiesKeysIncludeNewFields OperatorPropertiesKeys = "INCLUDE_NEW_FIELDS" ) // Values returns all known values for OperatorPropertiesKeys. Note that this can @@ -566,6 +567,7 @@ func (OperatorPropertiesKeys) Values() []OperatorPropertiesKeys { "CONCAT_FORMAT", "SUBFIELD_CATEGORY_MAP", "EXCLUDE_SOURCE_FIELDS_LIST", + "INCLUDE_NEW_FIELDS", } } @@ -843,6 +845,26 @@ func (SalesforceConnectorOperator) Values() []SalesforceConnectorOperator { } } +type SalesforceDataTransferApi string + +// Enum values for SalesforceDataTransferApi +const ( + SalesforceDataTransferApiAutomatic SalesforceDataTransferApi = "AUTOMATIC" + SalesforceDataTransferApiBulkv2 SalesforceDataTransferApi = "BULKV2" + SalesforceDataTransferApiRestSync SalesforceDataTransferApi = "REST_SYNC" +) + +// Values returns all known values for SalesforceDataTransferApi. 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 (SalesforceDataTransferApi) Values() []SalesforceDataTransferApi { + return []SalesforceDataTransferApi{ + "AUTOMATIC", + "BULKV2", + "REST_SYNC", + } +} + type SAPODataConnectorOperator string // Enum values for SAPODataConnectorOperator diff --git a/service/appflow/types/types.go b/service/appflow/types/types.go index b57cacc8e7c..e5dcf1959d8 100644 --- a/service/appflow/types/types.go +++ b/service/appflow/types/types.go @@ -1842,6 +1842,33 @@ type SalesforceDestinationProperties struct { // This member is required. Object *string + // Specifies which Salesforce API is used by Amazon AppFlow when your flow + // transfers data to Salesforce. AUTOMATIC The default. Amazon AppFlow selects + // which API to use based on the number of records that your flow transfers to + // Salesforce. If your flow transfers fewer than 1,000 records, Amazon AppFlow uses + // Salesforce REST API. If your flow transfers 1,000 records or more, Amazon + // AppFlow uses Salesforce Bulk API 2.0. Each of these Salesforce APIs structures + // data differently. If Amazon AppFlow selects the API automatically, be aware + // that, for recurring flows, the data output might vary from one flow run to the + // next. For example, if a flow runs daily, it might use REST API on one day to + // transfer 900 records, and it might use Bulk API 2.0 on the next day to transfer + // 1,100 records. For each of these flow runs, the respective Salesforce API + // formats the data differently. Some of the differences include how dates are + // formatted and null values are represented. Also, Bulk API 2.0 doesn't transfer + // Salesforce compound fields. By choosing this option, you optimize flow + // performance for both small and large data transfers, but the tradeoff is + // inconsistent formatting in the output. BULKV2 Amazon AppFlow uses only + // Salesforce Bulk API 2.0. This API runs asynchronous data transfers, and it's + // optimal for large sets of data. By choosing this option, you ensure that your + // flow writes consistent output, but you optimize performance only for large data + // transfers. Note that Bulk API 2.0 does not transfer Salesforce compound fields. + // REST_SYNC Amazon AppFlow uses only Salesforce REST API. By choosing this option, + // you ensure that your flow writes consistent output, but you decrease performance + // for large data transfers that are better suited for Bulk API 2.0. In some cases, + // if your flow attempts to transfer a vary large set of data, it might fail with a + // timed out error. + DataTransferApi SalesforceDataTransferApi + // The settings that determine how Amazon AppFlow handles an error when placing // data in the Salesforce destination. For example, this setting would determine if // the flow should fail after one insertion error, or continue and attempt to @@ -1863,6 +1890,10 @@ type SalesforceDestinationProperties struct { // The connector metadata specific to Salesforce. type SalesforceMetadata struct { + // The Salesforce APIs that you can have Amazon AppFlow use when your flows + // transfers data to or from Salesforce. + DataTransferApis []SalesforceDataTransferApi + // The desired authorization scope for the Salesforce account. OAuthScopes []string @@ -1877,6 +1908,33 @@ type SalesforceSourceProperties struct { // This member is required. Object *string + // Specifies which Salesforce API is used by Amazon AppFlow when your flow + // transfers data from Salesforce. AUTOMATIC The default. Amazon AppFlow selects + // which API to use based on the number of records that your flow transfers from + // Salesforce. If your flow transfers fewer than 1,000,000 records, Amazon AppFlow + // uses Salesforce REST API. If your flow transfers 1,000,000 records or more, + // Amazon AppFlow uses Salesforce Bulk API 2.0. Each of these Salesforce APIs + // structures data differently. If Amazon AppFlow selects the API automatically, be + // aware that, for recurring flows, the data output might vary from one flow run to + // the next. For example, if a flow runs daily, it might use REST API on one day to + // transfer 900,000 records, and it might use Bulk API 2.0 on the next day to + // transfer 1,100,000 records. For each of these flow runs, the respective + // Salesforce API formats the data differently. Some of the differences include how + // dates are formatted and null values are represented. Also, Bulk API 2.0 doesn't + // transfer Salesforce compound fields. By choosing this option, you optimize flow + // performance for both small and large data transfers, but the tradeoff is + // inconsistent formatting in the output. BULKV2 Amazon AppFlow uses only + // Salesforce Bulk API 2.0. This API runs asynchronous data transfers, and it's + // optimal for large sets of data. By choosing this option, you ensure that your + // flow writes consistent output, but you optimize performance only for large data + // transfers. Note that Bulk API 2.0 does not transfer Salesforce compound fields. + // REST_SYNC Amazon AppFlow uses only Salesforce REST API. By choosing this option, + // you ensure that your flow writes consistent output, but you decrease performance + // for large data transfers that are better suited for Bulk API 2.0. In some cases, + // if your flow attempts to transfer a vary large set of data, it might fail with a + // timed out error. + DataTransferApi SalesforceDataTransferApi + // The flag that enables dynamic fetching of new (recently added) fields in the // Salesforce objects while running a flow. EnableDynamicFieldUpdate bool diff --git a/service/connect/deserializers.go b/service/connect/deserializers.go index e0d0e76fe59..36c93e9c3c8 100644 --- a/service/connect/deserializers.go +++ b/service/connect/deserializers.go @@ -30710,6 +30710,24 @@ func awsRestjson1_deserializeDocumentUserIdentityInfo(v **types.UserIdentityInfo sv.LastName = ptr.String(jtv) } + case "Mobile": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PhoneNumber to be of type string, got %T instead", value) + } + sv.Mobile = ptr.String(jtv) + } + + case "SecondaryEmail": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Email to be of type string, got %T instead", value) + } + sv.SecondaryEmail = ptr.String(jtv) + } + default: _, _ = key, value diff --git a/service/connect/serializers.go b/service/connect/serializers.go index 3d07b4fb9b3..81f3d493d4e 100644 --- a/service/connect/serializers.go +++ b/service/connect/serializers.go @@ -14086,6 +14086,16 @@ func awsRestjson1_serializeDocumentUserIdentityInfo(v *types.UserIdentityInfo, v ok.String(*v.LastName) } + if v.Mobile != nil { + ok := object.Key("Mobile") + ok.String(*v.Mobile) + } + + if v.SecondaryEmail != nil { + ok := object.Key("SecondaryEmail") + ok.String(*v.SecondaryEmail) + } + return nil } diff --git a/service/connect/types/types.go b/service/connect/types/types.go index 9b89bafe05c..ac127ff9895 100644 --- a/service/connect/types/types.go +++ b/service/connect/types/types.go @@ -2175,6 +2175,14 @@ type UserIdentityInfo struct { // identity management. LastName *string + // The user's mobile number. + Mobile *string + + // The user's secondary email address. If you provide a secondary email, the user + // receives email notifications -- other than password reset notifications -- to + // this email address instead of to their primary email address. + SecondaryEmail *string + noSmithyDocumentSerde } diff --git a/service/directoryservice/api_op_DescribeClientAuthenticationSettings.go b/service/directoryservice/api_op_DescribeClientAuthenticationSettings.go index 15918689ecd..3f9f0475156 100644 --- a/service/directoryservice/api_op_DescribeClientAuthenticationSettings.go +++ b/service/directoryservice/api_op_DescribeClientAuthenticationSettings.go @@ -4,6 +4,7 @@ package directoryservice import ( "context" + "fmt" 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/directoryservice/types" @@ -135,6 +136,100 @@ func (c *Client) addOperationDescribeClientAuthenticationSettingsMiddlewares(sta return nil } +// DescribeClientAuthenticationSettingsAPIClient is a client that implements the +// DescribeClientAuthenticationSettings operation. +type DescribeClientAuthenticationSettingsAPIClient interface { + DescribeClientAuthenticationSettings(context.Context, *DescribeClientAuthenticationSettingsInput, ...func(*Options)) (*DescribeClientAuthenticationSettingsOutput, error) +} + +var _ DescribeClientAuthenticationSettingsAPIClient = (*Client)(nil) + +// DescribeClientAuthenticationSettingsPaginatorOptions is the paginator options +// for DescribeClientAuthenticationSettings +type DescribeClientAuthenticationSettingsPaginatorOptions struct { + // The maximum number of items to return. If this value is zero, the maximum number + // of items is specified by the limitations of the operation. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeClientAuthenticationSettingsPaginator is a paginator for +// DescribeClientAuthenticationSettings +type DescribeClientAuthenticationSettingsPaginator struct { + options DescribeClientAuthenticationSettingsPaginatorOptions + client DescribeClientAuthenticationSettingsAPIClient + params *DescribeClientAuthenticationSettingsInput + nextToken *string + firstPage bool +} + +// NewDescribeClientAuthenticationSettingsPaginator returns a new +// DescribeClientAuthenticationSettingsPaginator +func NewDescribeClientAuthenticationSettingsPaginator(client DescribeClientAuthenticationSettingsAPIClient, params *DescribeClientAuthenticationSettingsInput, optFns ...func(*DescribeClientAuthenticationSettingsPaginatorOptions)) *DescribeClientAuthenticationSettingsPaginator { + if params == nil { + params = &DescribeClientAuthenticationSettingsInput{} + } + + options := DescribeClientAuthenticationSettingsPaginatorOptions{} + if params.Limit != nil { + options.Limit = *params.Limit + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeClientAuthenticationSettingsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeClientAuthenticationSettingsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeClientAuthenticationSettings page. +func (p *DescribeClientAuthenticationSettingsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeClientAuthenticationSettingsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.Limit = limit + + result, err := p.client.DescribeClientAuthenticationSettings(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + func newServiceMetadataMiddleware_opDescribeClientAuthenticationSettings(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/directoryservice/api_op_DescribeDirectories.go b/service/directoryservice/api_op_DescribeDirectories.go index a970c9ebc57..15720782d37 100644 --- a/service/directoryservice/api_op_DescribeDirectories.go +++ b/service/directoryservice/api_op_DescribeDirectories.go @@ -4,6 +4,7 @@ package directoryservice import ( "context" + "fmt" 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/directoryservice/types" @@ -135,6 +136,98 @@ func (c *Client) addOperationDescribeDirectoriesMiddlewares(stack *middleware.St return nil } +// DescribeDirectoriesAPIClient is a client that implements the DescribeDirectories +// operation. +type DescribeDirectoriesAPIClient interface { + DescribeDirectories(context.Context, *DescribeDirectoriesInput, ...func(*Options)) (*DescribeDirectoriesOutput, error) +} + +var _ DescribeDirectoriesAPIClient = (*Client)(nil) + +// DescribeDirectoriesPaginatorOptions is the paginator options for +// DescribeDirectories +type DescribeDirectoriesPaginatorOptions struct { + // The maximum number of items to return. If this value is zero, the maximum number + // of items is specified by the limitations of the operation. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeDirectoriesPaginator is a paginator for DescribeDirectories +type DescribeDirectoriesPaginator struct { + options DescribeDirectoriesPaginatorOptions + client DescribeDirectoriesAPIClient + params *DescribeDirectoriesInput + nextToken *string + firstPage bool +} + +// NewDescribeDirectoriesPaginator returns a new DescribeDirectoriesPaginator +func NewDescribeDirectoriesPaginator(client DescribeDirectoriesAPIClient, params *DescribeDirectoriesInput, optFns ...func(*DescribeDirectoriesPaginatorOptions)) *DescribeDirectoriesPaginator { + if params == nil { + params = &DescribeDirectoriesInput{} + } + + options := DescribeDirectoriesPaginatorOptions{} + if params.Limit != nil { + options.Limit = *params.Limit + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeDirectoriesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeDirectoriesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeDirectories page. +func (p *DescribeDirectoriesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeDirectoriesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.Limit = limit + + result, err := p.client.DescribeDirectories(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + func newServiceMetadataMiddleware_opDescribeDirectories(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/directoryservice/api_op_DescribeLDAPSSettings.go b/service/directoryservice/api_op_DescribeLDAPSSettings.go index 01bf66f353c..b53d03ae815 100644 --- a/service/directoryservice/api_op_DescribeLDAPSSettings.go +++ b/service/directoryservice/api_op_DescribeLDAPSSettings.go @@ -4,6 +4,7 @@ package directoryservice import ( "context" + "fmt" 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/directoryservice/types" @@ -126,6 +127,97 @@ func (c *Client) addOperationDescribeLDAPSSettingsMiddlewares(stack *middleware. return nil } +// DescribeLDAPSSettingsAPIClient is a client that implements the +// DescribeLDAPSSettings operation. +type DescribeLDAPSSettingsAPIClient interface { + DescribeLDAPSSettings(context.Context, *DescribeLDAPSSettingsInput, ...func(*Options)) (*DescribeLDAPSSettingsOutput, error) +} + +var _ DescribeLDAPSSettingsAPIClient = (*Client)(nil) + +// DescribeLDAPSSettingsPaginatorOptions is the paginator options for +// DescribeLDAPSSettings +type DescribeLDAPSSettingsPaginatorOptions struct { + // Specifies the number of items that should be displayed on one page. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeLDAPSSettingsPaginator is a paginator for DescribeLDAPSSettings +type DescribeLDAPSSettingsPaginator struct { + options DescribeLDAPSSettingsPaginatorOptions + client DescribeLDAPSSettingsAPIClient + params *DescribeLDAPSSettingsInput + nextToken *string + firstPage bool +} + +// NewDescribeLDAPSSettingsPaginator returns a new DescribeLDAPSSettingsPaginator +func NewDescribeLDAPSSettingsPaginator(client DescribeLDAPSSettingsAPIClient, params *DescribeLDAPSSettingsInput, optFns ...func(*DescribeLDAPSSettingsPaginatorOptions)) *DescribeLDAPSSettingsPaginator { + if params == nil { + params = &DescribeLDAPSSettingsInput{} + } + + options := DescribeLDAPSSettingsPaginatorOptions{} + if params.Limit != nil { + options.Limit = *params.Limit + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeLDAPSSettingsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeLDAPSSettingsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeLDAPSSettings page. +func (p *DescribeLDAPSSettingsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeLDAPSSettingsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.Limit = limit + + result, err := p.client.DescribeLDAPSSettings(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + func newServiceMetadataMiddleware_opDescribeLDAPSSettings(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/directoryservice/api_op_DescribeRegions.go b/service/directoryservice/api_op_DescribeRegions.go index bed1150fb96..aa86b289539 100644 --- a/service/directoryservice/api_op_DescribeRegions.go +++ b/service/directoryservice/api_op_DescribeRegions.go @@ -4,6 +4,7 @@ package directoryservice import ( "context" + "fmt" 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/directoryservice/types" @@ -124,6 +125,84 @@ func (c *Client) addOperationDescribeRegionsMiddlewares(stack *middleware.Stack, return nil } +// DescribeRegionsAPIClient is a client that implements the DescribeRegions +// operation. +type DescribeRegionsAPIClient interface { + DescribeRegions(context.Context, *DescribeRegionsInput, ...func(*Options)) (*DescribeRegionsOutput, error) +} + +var _ DescribeRegionsAPIClient = (*Client)(nil) + +// DescribeRegionsPaginatorOptions is the paginator options for DescribeRegions +type DescribeRegionsPaginatorOptions struct { + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeRegionsPaginator is a paginator for DescribeRegions +type DescribeRegionsPaginator struct { + options DescribeRegionsPaginatorOptions + client DescribeRegionsAPIClient + params *DescribeRegionsInput + nextToken *string + firstPage bool +} + +// NewDescribeRegionsPaginator returns a new DescribeRegionsPaginator +func NewDescribeRegionsPaginator(client DescribeRegionsAPIClient, params *DescribeRegionsInput, optFns ...func(*DescribeRegionsPaginatorOptions)) *DescribeRegionsPaginator { + if params == nil { + params = &DescribeRegionsInput{} + } + + options := DescribeRegionsPaginatorOptions{} + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeRegionsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeRegionsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeRegions page. +func (p *DescribeRegionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeRegionsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + result, err := p.client.DescribeRegions(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + func newServiceMetadataMiddleware_opDescribeRegions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/directoryservice/api_op_DescribeSharedDirectories.go b/service/directoryservice/api_op_DescribeSharedDirectories.go index 192cdb4f169..4edb2d9d75a 100644 --- a/service/directoryservice/api_op_DescribeSharedDirectories.go +++ b/service/directoryservice/api_op_DescribeSharedDirectories.go @@ -4,6 +4,7 @@ package directoryservice import ( "context" + "fmt" 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/directoryservice/types" @@ -126,6 +127,98 @@ func (c *Client) addOperationDescribeSharedDirectoriesMiddlewares(stack *middlew return nil } +// DescribeSharedDirectoriesAPIClient is a client that implements the +// DescribeSharedDirectories operation. +type DescribeSharedDirectoriesAPIClient interface { + DescribeSharedDirectories(context.Context, *DescribeSharedDirectoriesInput, ...func(*Options)) (*DescribeSharedDirectoriesOutput, error) +} + +var _ DescribeSharedDirectoriesAPIClient = (*Client)(nil) + +// DescribeSharedDirectoriesPaginatorOptions is the paginator options for +// DescribeSharedDirectories +type DescribeSharedDirectoriesPaginatorOptions struct { + // The number of shared directories to return in the response object. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeSharedDirectoriesPaginator is a paginator for DescribeSharedDirectories +type DescribeSharedDirectoriesPaginator struct { + options DescribeSharedDirectoriesPaginatorOptions + client DescribeSharedDirectoriesAPIClient + params *DescribeSharedDirectoriesInput + nextToken *string + firstPage bool +} + +// NewDescribeSharedDirectoriesPaginator returns a new +// DescribeSharedDirectoriesPaginator +func NewDescribeSharedDirectoriesPaginator(client DescribeSharedDirectoriesAPIClient, params *DescribeSharedDirectoriesInput, optFns ...func(*DescribeSharedDirectoriesPaginatorOptions)) *DescribeSharedDirectoriesPaginator { + if params == nil { + params = &DescribeSharedDirectoriesInput{} + } + + options := DescribeSharedDirectoriesPaginatorOptions{} + if params.Limit != nil { + options.Limit = *params.Limit + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeSharedDirectoriesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeSharedDirectoriesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeSharedDirectories page. +func (p *DescribeSharedDirectoriesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeSharedDirectoriesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.Limit = limit + + result, err := p.client.DescribeSharedDirectories(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + func newServiceMetadataMiddleware_opDescribeSharedDirectories(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/directoryservice/api_op_DescribeSnapshots.go b/service/directoryservice/api_op_DescribeSnapshots.go index 4df9e2cb619..45e99b9f0b1 100644 --- a/service/directoryservice/api_op_DescribeSnapshots.go +++ b/service/directoryservice/api_op_DescribeSnapshots.go @@ -4,6 +4,7 @@ package directoryservice import ( "context" + "fmt" 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/directoryservice/types" @@ -132,6 +133,96 @@ func (c *Client) addOperationDescribeSnapshotsMiddlewares(stack *middleware.Stac return nil } +// DescribeSnapshotsAPIClient is a client that implements the DescribeSnapshots +// operation. +type DescribeSnapshotsAPIClient interface { + DescribeSnapshots(context.Context, *DescribeSnapshotsInput, ...func(*Options)) (*DescribeSnapshotsOutput, error) +} + +var _ DescribeSnapshotsAPIClient = (*Client)(nil) + +// DescribeSnapshotsPaginatorOptions is the paginator options for DescribeSnapshots +type DescribeSnapshotsPaginatorOptions struct { + // The maximum number of objects to return. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeSnapshotsPaginator is a paginator for DescribeSnapshots +type DescribeSnapshotsPaginator struct { + options DescribeSnapshotsPaginatorOptions + client DescribeSnapshotsAPIClient + params *DescribeSnapshotsInput + nextToken *string + firstPage bool +} + +// NewDescribeSnapshotsPaginator returns a new DescribeSnapshotsPaginator +func NewDescribeSnapshotsPaginator(client DescribeSnapshotsAPIClient, params *DescribeSnapshotsInput, optFns ...func(*DescribeSnapshotsPaginatorOptions)) *DescribeSnapshotsPaginator { + if params == nil { + params = &DescribeSnapshotsInput{} + } + + options := DescribeSnapshotsPaginatorOptions{} + if params.Limit != nil { + options.Limit = *params.Limit + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeSnapshotsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeSnapshotsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeSnapshots page. +func (p *DescribeSnapshotsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeSnapshotsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.Limit = limit + + result, err := p.client.DescribeSnapshots(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + func newServiceMetadataMiddleware_opDescribeSnapshots(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/directoryservice/api_op_DescribeTrusts.go b/service/directoryservice/api_op_DescribeTrusts.go index f6e71526713..2871e249605 100644 --- a/service/directoryservice/api_op_DescribeTrusts.go +++ b/service/directoryservice/api_op_DescribeTrusts.go @@ -4,6 +4,7 @@ package directoryservice import ( "context" + "fmt" 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/directoryservice/types" @@ -134,6 +135,96 @@ func (c *Client) addOperationDescribeTrustsMiddlewares(stack *middleware.Stack, return nil } +// DescribeTrustsAPIClient is a client that implements the DescribeTrusts +// operation. +type DescribeTrustsAPIClient interface { + DescribeTrusts(context.Context, *DescribeTrustsInput, ...func(*Options)) (*DescribeTrustsOutput, error) +} + +var _ DescribeTrustsAPIClient = (*Client)(nil) + +// DescribeTrustsPaginatorOptions is the paginator options for DescribeTrusts +type DescribeTrustsPaginatorOptions struct { + // The maximum number of objects to return. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeTrustsPaginator is a paginator for DescribeTrusts +type DescribeTrustsPaginator struct { + options DescribeTrustsPaginatorOptions + client DescribeTrustsAPIClient + params *DescribeTrustsInput + nextToken *string + firstPage bool +} + +// NewDescribeTrustsPaginator returns a new DescribeTrustsPaginator +func NewDescribeTrustsPaginator(client DescribeTrustsAPIClient, params *DescribeTrustsInput, optFns ...func(*DescribeTrustsPaginatorOptions)) *DescribeTrustsPaginator { + if params == nil { + params = &DescribeTrustsInput{} + } + + options := DescribeTrustsPaginatorOptions{} + if params.Limit != nil { + options.Limit = *params.Limit + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeTrustsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeTrustsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeTrusts page. +func (p *DescribeTrustsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeTrustsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.Limit = limit + + result, err := p.client.DescribeTrusts(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + func newServiceMetadataMiddleware_opDescribeTrusts(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/directoryservice/api_op_DescribeUpdateDirectory.go b/service/directoryservice/api_op_DescribeUpdateDirectory.go new file mode 100644 index 00000000000..ab80719b570 --- /dev/null +++ b/service/directoryservice/api_op_DescribeUpdateDirectory.go @@ -0,0 +1,218 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package directoryservice + +import ( + "context" + "fmt" + 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/directoryservice/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Describes the updates of a directory for a particular update type. +func (c *Client) DescribeUpdateDirectory(ctx context.Context, params *DescribeUpdateDirectoryInput, optFns ...func(*Options)) (*DescribeUpdateDirectoryOutput, error) { + if params == nil { + params = &DescribeUpdateDirectoryInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeUpdateDirectory", params, optFns, c.addOperationDescribeUpdateDirectoryMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeUpdateDirectoryOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeUpdateDirectoryInput struct { + + // The unique identifier of the directory. + // + // This member is required. + DirectoryId *string + + // The type of updates you want to describe for the directory. + // + // This member is required. + UpdateType types.UpdateType + + // The DescribeUpdateDirectoryResult. NextToken value from a previous call to + // DescribeUpdateDirectory. Pass null if this is the first call. + NextToken *string + + // The name of the Region. + RegionName *string + + noSmithyDocumentSerde +} + +type DescribeUpdateDirectoryOutput struct { + + // If not null, more results are available. Pass this value for the NextToken + // parameter. + NextToken *string + + // The list of update activities on a directory for the requested update type. + UpdateActivities []types.UpdateInfoEntry + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeUpdateDirectoryMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeUpdateDirectory{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeUpdateDirectory{}, 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 = addOpDescribeUpdateDirectoryValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeUpdateDirectory(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 +} + +// DescribeUpdateDirectoryAPIClient is a client that implements the +// DescribeUpdateDirectory operation. +type DescribeUpdateDirectoryAPIClient interface { + DescribeUpdateDirectory(context.Context, *DescribeUpdateDirectoryInput, ...func(*Options)) (*DescribeUpdateDirectoryOutput, error) +} + +var _ DescribeUpdateDirectoryAPIClient = (*Client)(nil) + +// DescribeUpdateDirectoryPaginatorOptions is the paginator options for +// DescribeUpdateDirectory +type DescribeUpdateDirectoryPaginatorOptions struct { + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeUpdateDirectoryPaginator is a paginator for DescribeUpdateDirectory +type DescribeUpdateDirectoryPaginator struct { + options DescribeUpdateDirectoryPaginatorOptions + client DescribeUpdateDirectoryAPIClient + params *DescribeUpdateDirectoryInput + nextToken *string + firstPage bool +} + +// NewDescribeUpdateDirectoryPaginator returns a new +// DescribeUpdateDirectoryPaginator +func NewDescribeUpdateDirectoryPaginator(client DescribeUpdateDirectoryAPIClient, params *DescribeUpdateDirectoryInput, optFns ...func(*DescribeUpdateDirectoryPaginatorOptions)) *DescribeUpdateDirectoryPaginator { + if params == nil { + params = &DescribeUpdateDirectoryInput{} + } + + options := DescribeUpdateDirectoryPaginatorOptions{} + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeUpdateDirectoryPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeUpdateDirectoryPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeUpdateDirectory page. +func (p *DescribeUpdateDirectoryPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeUpdateDirectoryOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + result, err := p.client.DescribeUpdateDirectory(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opDescribeUpdateDirectory(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ds", + OperationName: "DescribeUpdateDirectory", + } +} diff --git a/service/directoryservice/api_op_ListCertificates.go b/service/directoryservice/api_op_ListCertificates.go index 79ac21f3af6..f7268f5ca82 100644 --- a/service/directoryservice/api_op_ListCertificates.go +++ b/service/directoryservice/api_op_ListCertificates.go @@ -4,6 +4,7 @@ package directoryservice import ( "context" + "fmt" 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/directoryservice/types" @@ -126,6 +127,96 @@ func (c *Client) addOperationListCertificatesMiddlewares(stack *middleware.Stack return nil } +// ListCertificatesAPIClient is a client that implements the ListCertificates +// operation. +type ListCertificatesAPIClient interface { + ListCertificates(context.Context, *ListCertificatesInput, ...func(*Options)) (*ListCertificatesOutput, error) +} + +var _ ListCertificatesAPIClient = (*Client)(nil) + +// ListCertificatesPaginatorOptions is the paginator options for ListCertificates +type ListCertificatesPaginatorOptions struct { + // The number of items that should show up on one page + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListCertificatesPaginator is a paginator for ListCertificates +type ListCertificatesPaginator struct { + options ListCertificatesPaginatorOptions + client ListCertificatesAPIClient + params *ListCertificatesInput + nextToken *string + firstPage bool +} + +// NewListCertificatesPaginator returns a new ListCertificatesPaginator +func NewListCertificatesPaginator(client ListCertificatesAPIClient, params *ListCertificatesInput, optFns ...func(*ListCertificatesPaginatorOptions)) *ListCertificatesPaginator { + if params == nil { + params = &ListCertificatesInput{} + } + + options := ListCertificatesPaginatorOptions{} + if params.Limit != nil { + options.Limit = *params.Limit + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListCertificatesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListCertificatesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListCertificates page. +func (p *ListCertificatesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListCertificatesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.Limit = limit + + result, err := p.client.ListCertificates(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + func newServiceMetadataMiddleware_opListCertificates(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/directoryservice/api_op_ListIpRoutes.go b/service/directoryservice/api_op_ListIpRoutes.go index 17670b801a3..314b2554e7b 100644 --- a/service/directoryservice/api_op_ListIpRoutes.go +++ b/service/directoryservice/api_op_ListIpRoutes.go @@ -4,6 +4,7 @@ package directoryservice import ( "context" + "fmt" 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/directoryservice/types" @@ -125,6 +126,96 @@ func (c *Client) addOperationListIpRoutesMiddlewares(stack *middleware.Stack, op return nil } +// ListIpRoutesAPIClient is a client that implements the ListIpRoutes operation. +type ListIpRoutesAPIClient interface { + ListIpRoutes(context.Context, *ListIpRoutesInput, ...func(*Options)) (*ListIpRoutesOutput, error) +} + +var _ ListIpRoutesAPIClient = (*Client)(nil) + +// ListIpRoutesPaginatorOptions is the paginator options for ListIpRoutes +type ListIpRoutesPaginatorOptions struct { + // Maximum number of items to return. If this value is zero, the maximum number of + // items is specified by the limitations of the operation. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListIpRoutesPaginator is a paginator for ListIpRoutes +type ListIpRoutesPaginator struct { + options ListIpRoutesPaginatorOptions + client ListIpRoutesAPIClient + params *ListIpRoutesInput + nextToken *string + firstPage bool +} + +// NewListIpRoutesPaginator returns a new ListIpRoutesPaginator +func NewListIpRoutesPaginator(client ListIpRoutesAPIClient, params *ListIpRoutesInput, optFns ...func(*ListIpRoutesPaginatorOptions)) *ListIpRoutesPaginator { + if params == nil { + params = &ListIpRoutesInput{} + } + + options := ListIpRoutesPaginatorOptions{} + if params.Limit != nil { + options.Limit = *params.Limit + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListIpRoutesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListIpRoutesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListIpRoutes page. +func (p *ListIpRoutesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListIpRoutesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.Limit = limit + + result, err := p.client.ListIpRoutes(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + func newServiceMetadataMiddleware_opListIpRoutes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/directoryservice/api_op_ListLogSubscriptions.go b/service/directoryservice/api_op_ListLogSubscriptions.go index a135612c9ea..413a13780b7 100644 --- a/service/directoryservice/api_op_ListLogSubscriptions.go +++ b/service/directoryservice/api_op_ListLogSubscriptions.go @@ -4,6 +4,7 @@ package directoryservice import ( "context" + "fmt" 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/directoryservice/types" @@ -120,6 +121,97 @@ func (c *Client) addOperationListLogSubscriptionsMiddlewares(stack *middleware.S return nil } +// ListLogSubscriptionsAPIClient is a client that implements the +// ListLogSubscriptions operation. +type ListLogSubscriptionsAPIClient interface { + ListLogSubscriptions(context.Context, *ListLogSubscriptionsInput, ...func(*Options)) (*ListLogSubscriptionsOutput, error) +} + +var _ ListLogSubscriptionsAPIClient = (*Client)(nil) + +// ListLogSubscriptionsPaginatorOptions is the paginator options for +// ListLogSubscriptions +type ListLogSubscriptionsPaginatorOptions struct { + // The maximum number of items returned. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListLogSubscriptionsPaginator is a paginator for ListLogSubscriptions +type ListLogSubscriptionsPaginator struct { + options ListLogSubscriptionsPaginatorOptions + client ListLogSubscriptionsAPIClient + params *ListLogSubscriptionsInput + nextToken *string + firstPage bool +} + +// NewListLogSubscriptionsPaginator returns a new ListLogSubscriptionsPaginator +func NewListLogSubscriptionsPaginator(client ListLogSubscriptionsAPIClient, params *ListLogSubscriptionsInput, optFns ...func(*ListLogSubscriptionsPaginatorOptions)) *ListLogSubscriptionsPaginator { + if params == nil { + params = &ListLogSubscriptionsInput{} + } + + options := ListLogSubscriptionsPaginatorOptions{} + if params.Limit != nil { + options.Limit = *params.Limit + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListLogSubscriptionsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListLogSubscriptionsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListLogSubscriptions page. +func (p *ListLogSubscriptionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListLogSubscriptionsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.Limit = limit + + result, err := p.client.ListLogSubscriptions(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + func newServiceMetadataMiddleware_opListLogSubscriptions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/directoryservice/api_op_ListSchemaExtensions.go b/service/directoryservice/api_op_ListSchemaExtensions.go index 2db3734de51..f8a1b00f14e 100644 --- a/service/directoryservice/api_op_ListSchemaExtensions.go +++ b/service/directoryservice/api_op_ListSchemaExtensions.go @@ -4,6 +4,7 @@ package directoryservice import ( "context" + "fmt" 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/directoryservice/types" @@ -124,6 +125,97 @@ func (c *Client) addOperationListSchemaExtensionsMiddlewares(stack *middleware.S return nil } +// ListSchemaExtensionsAPIClient is a client that implements the +// ListSchemaExtensions operation. +type ListSchemaExtensionsAPIClient interface { + ListSchemaExtensions(context.Context, *ListSchemaExtensionsInput, ...func(*Options)) (*ListSchemaExtensionsOutput, error) +} + +var _ ListSchemaExtensionsAPIClient = (*Client)(nil) + +// ListSchemaExtensionsPaginatorOptions is the paginator options for +// ListSchemaExtensions +type ListSchemaExtensionsPaginatorOptions struct { + // The maximum number of items to return. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListSchemaExtensionsPaginator is a paginator for ListSchemaExtensions +type ListSchemaExtensionsPaginator struct { + options ListSchemaExtensionsPaginatorOptions + client ListSchemaExtensionsAPIClient + params *ListSchemaExtensionsInput + nextToken *string + firstPage bool +} + +// NewListSchemaExtensionsPaginator returns a new ListSchemaExtensionsPaginator +func NewListSchemaExtensionsPaginator(client ListSchemaExtensionsAPIClient, params *ListSchemaExtensionsInput, optFns ...func(*ListSchemaExtensionsPaginatorOptions)) *ListSchemaExtensionsPaginator { + if params == nil { + params = &ListSchemaExtensionsInput{} + } + + options := ListSchemaExtensionsPaginatorOptions{} + if params.Limit != nil { + options.Limit = *params.Limit + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListSchemaExtensionsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListSchemaExtensionsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListSchemaExtensions page. +func (p *ListSchemaExtensionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListSchemaExtensionsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.Limit = limit + + result, err := p.client.ListSchemaExtensions(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + func newServiceMetadataMiddleware_opListSchemaExtensions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/directoryservice/api_op_ListTagsForResource.go b/service/directoryservice/api_op_ListTagsForResource.go index 31c0a896ba0..23e6bb11c8b 100644 --- a/service/directoryservice/api_op_ListTagsForResource.go +++ b/service/directoryservice/api_op_ListTagsForResource.go @@ -4,6 +4,7 @@ package directoryservice import ( "context" + "fmt" 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/directoryservice/types" @@ -120,6 +121,97 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St return nil } +// ListTagsForResourceAPIClient is a client that implements the ListTagsForResource +// operation. +type ListTagsForResourceAPIClient interface { + ListTagsForResource(context.Context, *ListTagsForResourceInput, ...func(*Options)) (*ListTagsForResourceOutput, error) +} + +var _ ListTagsForResourceAPIClient = (*Client)(nil) + +// ListTagsForResourcePaginatorOptions is the paginator options for +// ListTagsForResource +type ListTagsForResourcePaginatorOptions struct { + // Reserved for future use. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListTagsForResourcePaginator is a paginator for ListTagsForResource +type ListTagsForResourcePaginator struct { + options ListTagsForResourcePaginatorOptions + client ListTagsForResourceAPIClient + params *ListTagsForResourceInput + nextToken *string + firstPage bool +} + +// NewListTagsForResourcePaginator returns a new ListTagsForResourcePaginator +func NewListTagsForResourcePaginator(client ListTagsForResourceAPIClient, params *ListTagsForResourceInput, optFns ...func(*ListTagsForResourcePaginatorOptions)) *ListTagsForResourcePaginator { + if params == nil { + params = &ListTagsForResourceInput{} + } + + options := ListTagsForResourcePaginatorOptions{} + if params.Limit != nil { + options.Limit = *params.Limit + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListTagsForResourcePaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListTagsForResourcePaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListTagsForResource page. +func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListTagsForResourceOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.Limit = limit + + result, err := p.client.ListTagsForResource(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + func newServiceMetadataMiddleware_opListTagsForResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/directoryservice/api_op_UpdateDirectorySetup.go b/service/directoryservice/api_op_UpdateDirectorySetup.go new file mode 100644 index 00000000000..6e90ecc6a16 --- /dev/null +++ b/service/directoryservice/api_op_UpdateDirectorySetup.go @@ -0,0 +1,129 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package directoryservice + +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/directoryservice/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates the directory for a particular update type. +func (c *Client) UpdateDirectorySetup(ctx context.Context, params *UpdateDirectorySetupInput, optFns ...func(*Options)) (*UpdateDirectorySetupOutput, error) { + if params == nil { + params = &UpdateDirectorySetupInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateDirectorySetup", params, optFns, c.addOperationUpdateDirectorySetupMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateDirectorySetupOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateDirectorySetupInput struct { + + // The identifier of the directory on which you want to perform the update. + // + // This member is required. + DirectoryId *string + + // The type of update that needs to be performed on the directory. For example, OS. + // + // This member is required. + UpdateType types.UpdateType + + // The boolean that specifies if a snapshot for the directory needs to be taken + // before updating the directory. + CreateSnapshotBeforeUpdate *bool + + // The settings for the OS update that needs to be performed on the directory. + OSUpdateSettings *types.OSUpdateSettings + + noSmithyDocumentSerde +} + +type UpdateDirectorySetupOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateDirectorySetupMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateDirectorySetup{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateDirectorySetup{}, 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 = addOpUpdateDirectorySetupValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateDirectorySetup(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_opUpdateDirectorySetup(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ds", + OperationName: "UpdateDirectorySetup", + } +} diff --git a/service/directoryservice/deserializers.go b/service/directoryservice/deserializers.go index 8a80d50cd82..4e35bdcd703 100644 --- a/service/directoryservice/deserializers.go +++ b/service/directoryservice/deserializers.go @@ -4132,6 +4132,132 @@ func awsAwsjson11_deserializeOpErrorDescribeTrusts(response *smithyhttp.Response } } +type awsAwsjson11_deserializeOpDescribeUpdateDirectory struct { +} + +func (*awsAwsjson11_deserializeOpDescribeUpdateDirectory) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDescribeUpdateDirectory) 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_deserializeOpErrorDescribeUpdateDirectory(response, &metadata) + } + output := &DescribeUpdateDirectoryOutput{} + 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_deserializeOpDocumentDescribeUpdateDirectoryOutput(&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_deserializeOpErrorDescribeUpdateDirectory(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("AccessDeniedException", errorCode): + return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ClientException", errorCode): + return awsAwsjson11_deserializeErrorClientException(response, errorBody) + + case strings.EqualFold("DirectoryDoesNotExistException", errorCode): + return awsAwsjson11_deserializeErrorDirectoryDoesNotExistException(response, errorBody) + + case strings.EqualFold("InvalidNextTokenException", errorCode): + return awsAwsjson11_deserializeErrorInvalidNextTokenException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("ServiceException", errorCode): + return awsAwsjson11_deserializeErrorServiceException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsjson11_deserializeOpDisableClientAuthentication struct { } @@ -7489,6 +7615,141 @@ func awsAwsjson11_deserializeOpErrorUpdateConditionalForwarder(response *smithyh } } +type awsAwsjson11_deserializeOpUpdateDirectorySetup struct { +} + +func (*awsAwsjson11_deserializeOpUpdateDirectorySetup) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpUpdateDirectorySetup) 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_deserializeOpErrorUpdateDirectorySetup(response, &metadata) + } + output := &UpdateDirectorySetupOutput{} + 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_deserializeOpDocumentUpdateDirectorySetupOutput(&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_deserializeOpErrorUpdateDirectorySetup(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("AccessDeniedException", errorCode): + return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ClientException", errorCode): + return awsAwsjson11_deserializeErrorClientException(response, errorBody) + + case strings.EqualFold("DirectoryDoesNotExistException", errorCode): + return awsAwsjson11_deserializeErrorDirectoryDoesNotExistException(response, errorBody) + + case strings.EqualFold("DirectoryInDesiredStateException", errorCode): + return awsAwsjson11_deserializeErrorDirectoryInDesiredStateException(response, errorBody) + + case strings.EqualFold("DirectoryUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorDirectoryUnavailableException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("ServiceException", errorCode): + return awsAwsjson11_deserializeErrorServiceException(response, errorBody) + + case strings.EqualFold("SnapshotLimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorSnapshotLimitExceededException(response, errorBody) + + case strings.EqualFold("UnsupportedOperationException", errorCode): + return awsAwsjson11_deserializeErrorUnsupportedOperationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsjson11_deserializeOpUpdateNumberOfDomainControllers struct { } @@ -8463,6 +8724,41 @@ func awsAwsjson11_deserializeErrorDirectoryDoesNotExistException(response *smith return output } +func awsAwsjson11_deserializeErrorDirectoryInDesiredStateException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, 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 err + } + + output := &types.DirectoryInDesiredStateException{} + err := awsAwsjson11_deserializeDocumentDirectoryInDesiredStateException(&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 err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + func awsAwsjson11_deserializeErrorDirectoryLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -10704,6 +11000,15 @@ func awsAwsjson11_deserializeDocumentDirectoryDescription(v **types.DirectoryDes sv.Name = ptr.String(jtv) } + case "OsVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OSVersion to be of type string, got %T instead", value) + } + sv.OsVersion = types.OSVersion(jtv) + } + case "OwnerDirectoryDescription": if err := awsAwsjson11_deserializeDocumentOwnerDirectoryDescription(&sv.OwnerDirectoryDescription, value); err != nil { return err @@ -10922,6 +11227,55 @@ func awsAwsjson11_deserializeDocumentDirectoryDoesNotExistException(v **types.Di return nil } +func awsAwsjson11_deserializeDocumentDirectoryInDesiredStateException(v **types.DirectoryInDesiredStateException, 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.DirectoryInDesiredStateException + if *v == nil { + sv = &types.DirectoryInDesiredStateException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "RequestId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RequestId to be of type string, got %T instead", value) + } + sv.RequestId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentDirectoryLimitExceededException(v **types.DirectoryLimitExceededException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -12726,6 +13080,46 @@ func awsAwsjson11_deserializeDocumentOrganizationsException(v **types.Organizati return nil } +func awsAwsjson11_deserializeDocumentOSUpdateSettings(v **types.OSUpdateSettings, 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.OSUpdateSettings + if *v == nil { + sv = &types.OSUpdateSettings{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "OSVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OSVersion to be of type string, got %T instead", value) + } + sv.OSVersion = types.OSVersion(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentOwnerDirectoryDescription(v **types.OwnerDirectoryDescription, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -14464,6 +14858,185 @@ func awsAwsjson11_deserializeDocumentUnsupportedSettingsException(v **types.Unsu return nil } +func awsAwsjson11_deserializeDocumentUpdateActivities(v *[]types.UpdateInfoEntry, 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.UpdateInfoEntry + if *v == nil { + cv = []types.UpdateInfoEntry{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.UpdateInfoEntry + destAddr := &col + if err := awsAwsjson11_deserializeDocumentUpdateInfoEntry(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentUpdateInfoEntry(v **types.UpdateInfoEntry, 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.UpdateInfoEntry + if *v == nil { + sv = &types.UpdateInfoEntry{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "InitiatedBy": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InitiatedBy to be of type string, got %T instead", value) + } + sv.InitiatedBy = ptr.String(jtv) + } + + case "LastUpdatedDateTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastUpdatedDateTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected LastUpdatedDateTime to be a JSON Number, got %T instead", value) + + } + } + + case "NewValue": + if err := awsAwsjson11_deserializeDocumentUpdateValue(&sv.NewValue, value); err != nil { + return err + } + + case "PreviousValue": + if err := awsAwsjson11_deserializeDocumentUpdateValue(&sv.PreviousValue, value); err != nil { + return err + } + + case "Region": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RegionName to be of type string, got %T instead", value) + } + sv.Region = 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 StartDateTime to be a JSON Number, got %T instead", value) + + } + } + + case "Status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UpdateStatus to be of type string, got %T instead", value) + } + sv.Status = types.UpdateStatus(jtv) + } + + case "StatusReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UpdateStatusReason to be of type string, got %T instead", value) + } + sv.StatusReason = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentUpdateValue(v **types.UpdateValue, 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.UpdateValue + if *v == nil { + sv = &types.UpdateValue{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "OSUpdateSettings": + if err := awsAwsjson11_deserializeDocumentOSUpdateSettings(&sv.OSUpdateSettings, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentUserDoesNotExistException(v **types.UserDoesNotExistException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -15786,6 +16359,51 @@ func awsAwsjson11_deserializeOpDocumentDescribeTrustsOutput(v **DescribeTrustsOu return nil } +func awsAwsjson11_deserializeOpDocumentDescribeUpdateDirectoryOutput(v **DescribeUpdateDirectoryOutput, 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 *DescribeUpdateDirectoryOutput + if *v == nil { + sv = &DescribeUpdateDirectoryOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "UpdateActivities": + if err := awsAwsjson11_deserializeDocumentUpdateActivities(&sv.UpdateActivities, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentDisableClientAuthenticationOutput(v **DisableClientAuthenticationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -16748,6 +17366,37 @@ func awsAwsjson11_deserializeOpDocumentUpdateConditionalForwarderOutput(v **Upda return nil } +func awsAwsjson11_deserializeOpDocumentUpdateDirectorySetupOutput(v **UpdateDirectorySetupOutput, 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 *UpdateDirectorySetupOutput + if *v == nil { + sv = &UpdateDirectorySetupOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentUpdateNumberOfDomainControllersOutput(v **UpdateNumberOfDomainControllersOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/directoryservice/generated.json b/service/directoryservice/generated.json index cf691ac6b31..abbe434b6de 100644 --- a/service/directoryservice/generated.json +++ b/service/directoryservice/generated.json @@ -41,6 +41,7 @@ "api_op_DescribeSharedDirectories.go", "api_op_DescribeSnapshots.go", "api_op_DescribeTrusts.go", + "api_op_DescribeUpdateDirectory.go", "api_op_DisableClientAuthentication.go", "api_op_DisableLDAPS.go", "api_op_DisableRadius.go", @@ -68,6 +69,7 @@ "api_op_StartSchemaExtension.go", "api_op_UnshareDirectory.go", "api_op_UpdateConditionalForwarder.go", + "api_op_UpdateDirectorySetup.go", "api_op_UpdateNumberOfDomainControllers.go", "api_op_UpdateRadius.go", "api_op_UpdateSettings.go", diff --git a/service/directoryservice/serializers.go b/service/directoryservice/serializers.go index 803f25dc0b9..7176bb32d02 100644 --- a/service/directoryservice/serializers.go +++ b/service/directoryservice/serializers.go @@ -1830,6 +1830,61 @@ func (m *awsAwsjson11_serializeOpDescribeTrusts) HandleSerialize(ctx context.Con return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpDescribeUpdateDirectory struct { +} + +func (*awsAwsjson11_serializeOpDescribeUpdateDirectory) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDescribeUpdateDirectory) 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.(*DescribeUpdateDirectoryInput) + _ = 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("DirectoryService_20150416.DescribeUpdateDirectory") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDescribeUpdateDirectoryInput(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_serializeOpDisableClientAuthentication struct { } @@ -3315,6 +3370,61 @@ func (m *awsAwsjson11_serializeOpUpdateConditionalForwarder) HandleSerialize(ctx return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpUpdateDirectorySetup struct { +} + +func (*awsAwsjson11_serializeOpUpdateDirectorySetup) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpUpdateDirectorySetup) 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.(*UpdateDirectorySetupInput) + _ = 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("DirectoryService_20150416.UpdateDirectorySetup") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentUpdateDirectorySetupInput(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_serializeOpUpdateNumberOfDomainControllers struct { } @@ -3755,6 +3865,18 @@ func awsAwsjson11_serializeDocumentIpRoutes(v []types.IpRoute, value smithyjson. return nil } +func awsAwsjson11_serializeDocumentOSUpdateSettings(v *types.OSUpdateSettings, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.OSVersion) > 0 { + ok := object.Key("OSVersion") + ok.String(string(v.OSVersion)) + } + + return nil +} + func awsAwsjson11_serializeDocumentRadiusSettings(v *types.RadiusSettings, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -4759,6 +4881,33 @@ func awsAwsjson11_serializeOpDocumentDescribeTrustsInput(v *DescribeTrustsInput, return nil } +func awsAwsjson11_serializeOpDocumentDescribeUpdateDirectoryInput(v *DescribeUpdateDirectoryInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DirectoryId != nil { + ok := object.Key("DirectoryId") + ok.String(*v.DirectoryId) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + if v.RegionName != nil { + ok := object.Key("RegionName") + ok.String(*v.RegionName) + } + + if len(v.UpdateType) > 0 { + ok := object.Key("UpdateType") + ok.String(string(v.UpdateType)) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentDisableClientAuthenticationInput(v *DisableClientAuthenticationInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -5272,6 +5421,35 @@ func awsAwsjson11_serializeOpDocumentUpdateConditionalForwarderInput(v *UpdateCo return nil } +func awsAwsjson11_serializeOpDocumentUpdateDirectorySetupInput(v *UpdateDirectorySetupInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CreateSnapshotBeforeUpdate != nil { + ok := object.Key("CreateSnapshotBeforeUpdate") + ok.Boolean(*v.CreateSnapshotBeforeUpdate) + } + + if v.DirectoryId != nil { + ok := object.Key("DirectoryId") + ok.String(*v.DirectoryId) + } + + if v.OSUpdateSettings != nil { + ok := object.Key("OSUpdateSettings") + if err := awsAwsjson11_serializeDocumentOSUpdateSettings(v.OSUpdateSettings, ok); err != nil { + return err + } + } + + if len(v.UpdateType) > 0 { + ok := object.Key("UpdateType") + ok.String(string(v.UpdateType)) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentUpdateNumberOfDomainControllersInput(v *UpdateNumberOfDomainControllersInput, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/directoryservice/types/enums.go b/service/directoryservice/types/enums.go index 00d50004592..0be80ffb2fc 100644 --- a/service/directoryservice/types/enums.go +++ b/service/directoryservice/types/enums.go @@ -292,6 +292,24 @@ func (LDAPSType) Values() []LDAPSType { } } +type OSVersion string + +// Enum values for OSVersion +const ( + OSVersionVersion2012 OSVersion = "SERVER_2012" + OSVersionVersion2019 OSVersion = "SERVER_2019" +) + +// Values returns all known values for OSVersion. 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 (OSVersion) Values() []OSVersion { + return []OSVersion{ + "SERVER_2012", + "SERVER_2019", + } +} + type RadiusAuthenticationProtocol string // Enum values for RadiusAuthenticationProtocol @@ -617,3 +635,39 @@ func (TrustType) Values() []TrustType { "External", } } + +type UpdateStatus string + +// Enum values for UpdateStatus +const ( + UpdateStatusUpdated UpdateStatus = "Updated" + UpdateStatusUpdating UpdateStatus = "Updating" + UpdateStatusUpdateFailed UpdateStatus = "UpdateFailed" +) + +// Values returns all known values for UpdateStatus. 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 (UpdateStatus) Values() []UpdateStatus { + return []UpdateStatus{ + "Updated", + "Updating", + "UpdateFailed", + } +} + +type UpdateType string + +// Enum values for UpdateType +const ( + UpdateTypeOs UpdateType = "OS" +) + +// Values returns all known values for UpdateType. 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 (UpdateType) Values() []UpdateType { + return []UpdateType{ + "OS", + } +} diff --git a/service/directoryservice/types/errors.go b/service/directoryservice/types/errors.go index e684fbfdb9e..23f220a5fe2 100644 --- a/service/directoryservice/types/errors.go +++ b/service/directoryservice/types/errors.go @@ -232,6 +232,29 @@ func (e *DirectoryDoesNotExistException) ErrorMessage() string { func (e *DirectoryDoesNotExistException) ErrorCode() string { return "DirectoryDoesNotExistException" } func (e *DirectoryDoesNotExistException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } +// The directory is already updated to desired update type settings. +type DirectoryInDesiredStateException struct { + Message *string + + RequestId *string + + noSmithyDocumentSerde +} + +func (e *DirectoryInDesiredStateException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *DirectoryInDesiredStateException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *DirectoryInDesiredStateException) ErrorCode() string { + return "DirectoryInDesiredStateException" +} +func (e *DirectoryInDesiredStateException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + // The maximum number of directories in the region has been reached. You can use // the GetDirectoryLimits operation to determine your directory limits in the // region. diff --git a/service/directoryservice/types/types.go b/service/directoryservice/types/types.go index 2b2377cc5c2..ff62c34410a 100644 --- a/service/directoryservice/types/types.go +++ b/service/directoryservice/types/types.go @@ -244,6 +244,9 @@ type DirectoryDescription struct { // The fully qualified name of the directory. Name *string + // The operating system (OS) version of the directory. + OsVersion OSVersion + // Describes the Managed Microsoft AD directory in the directory owner account. OwnerDirectoryDescription *OwnerDirectoryDescription @@ -500,6 +503,15 @@ type LogSubscription struct { noSmithyDocumentSerde } +// OS version that the directory needs to be updated to. +type OSUpdateSettings struct { + + // OS version that the directory needs to be updated to. + OSVersion OSVersion + + noSmithyDocumentSerde +} + // Describes the directory owner account details that have been shared to the // directory consumer account. type OwnerDirectoryDescription struct { @@ -872,4 +884,44 @@ type UnshareTarget struct { noSmithyDocumentSerde } +// An entry of update information related to a requested update type. +type UpdateInfoEntry struct { + + // This specifies if the update was initiated by the customer or by the service + // team. + InitiatedBy *string + + // The last updated date and time of a particular directory setting. + LastUpdatedDateTime *time.Time + + // The new value of the target setting. + NewValue *UpdateValue + + // The old value of the target setting. + PreviousValue *UpdateValue + + // The name of the Region. + Region *string + + // The start time of the UpdateDirectorySetup for the particular type. + StartTime *time.Time + + // The status of the update performed on the directory. + Status UpdateStatus + + // The reason for the current status of the update type activity. + StatusReason *string + + noSmithyDocumentSerde +} + +// The value for a given type of UpdateSettings. +type UpdateValue struct { + + // The OS update related settings. + OSUpdateSettings *OSUpdateSettings + + noSmithyDocumentSerde +} + type noSmithyDocumentSerde = smithydocument.NoSerde diff --git a/service/directoryservice/validators.go b/service/directoryservice/validators.go index 57322a83a58..2786dcf230c 100644 --- a/service/directoryservice/validators.go +++ b/service/directoryservice/validators.go @@ -590,6 +590,26 @@ func (m *validateOpDescribeSharedDirectories) HandleInitialize(ctx context.Conte return next.HandleInitialize(ctx, in) } +type validateOpDescribeUpdateDirectory struct { +} + +func (*validateOpDescribeUpdateDirectory) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeUpdateDirectory) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeUpdateDirectoryInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeUpdateDirectoryInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDisableClientAuthentication struct { } @@ -1090,6 +1110,26 @@ func (m *validateOpUpdateConditionalForwarder) HandleInitialize(ctx context.Cont return next.HandleInitialize(ctx, in) } +type validateOpUpdateDirectorySetup struct { +} + +func (*validateOpUpdateDirectorySetup) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateDirectorySetup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateDirectorySetupInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateDirectorySetupInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpUpdateNumberOfDomainControllers struct { } @@ -1306,6 +1346,10 @@ func addOpDescribeSharedDirectoriesValidationMiddleware(stack *middleware.Stack) return stack.Initialize.Add(&validateOpDescribeSharedDirectories{}, middleware.After) } +func addOpDescribeUpdateDirectoryValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeUpdateDirectory{}, middleware.After) +} + func addOpDisableClientAuthenticationValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDisableClientAuthentication{}, middleware.After) } @@ -1406,6 +1450,10 @@ func addOpUpdateConditionalForwarderValidationMiddleware(stack *middleware.Stack return stack.Initialize.Add(&validateOpUpdateConditionalForwarder{}, middleware.After) } +func addOpUpdateDirectorySetupValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateDirectorySetup{}, middleware.After) +} + func addOpUpdateNumberOfDomainControllersValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateNumberOfDomainControllers{}, middleware.After) } @@ -2120,6 +2168,24 @@ func validateOpDescribeSharedDirectoriesInput(v *DescribeSharedDirectoriesInput) } } +func validateOpDescribeUpdateDirectoryInput(v *DescribeUpdateDirectoryInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeUpdateDirectoryInput"} + if v.DirectoryId == nil { + invalidParams.Add(smithy.NewErrParamRequired("DirectoryId")) + } + if len(v.UpdateType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("UpdateType")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDisableClientAuthenticationInput(v *DisableClientAuthenticationInput) error { if v == nil { return nil @@ -2557,6 +2623,24 @@ func validateOpUpdateConditionalForwarderInput(v *UpdateConditionalForwarderInpu } } +func validateOpUpdateDirectorySetupInput(v *UpdateDirectorySetupInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateDirectorySetupInput"} + if v.DirectoryId == nil { + invalidParams.Add(smithy.NewErrParamRequired("DirectoryId")) + } + if len(v.UpdateType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("UpdateType")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpUpdateNumberOfDomainControllersInput(v *UpdateNumberOfDomainControllersInput) error { if v == nil { return nil diff --git a/service/ecs/types/types.go b/service/ecs/types/types.go index fecfecb0cab..4e5d6040e2e 100644 --- a/service/ecs/types/types.go +++ b/service/ecs/types/types.go @@ -2420,13 +2420,20 @@ type ManagedScaling struct { // omitted, the default value of 300 seconds is used. InstanceWarmupPeriod *int32 - // The maximum number of container instances that Amazon ECS scales in or scales - // out at one time. If this parameter is omitted, the default value of 10000 is - // used. + // The maximum number of Amazon EC2 instances that Amazon ECS will scale out at one + // time. The scale in process is not affected by this parameter. If this parameter + // is omitted, the default value of 10000 is used. MaximumScalingStepSize *int32 - // The minimum number of container instances that Amazon ECS scales in or scales - // out at one time. If this parameter is omitted, the default value of 1 is used. + // The minimum number of Amazon EC2 instances that Amazon ECS will scale out at one + // time. The scale in process is not affected by this parameter If this parameter + // is omitted, the default value of 1 is used. When additional capacity is + // required, Amazon ECS will scale up the minimum scaling step size even if the + // actual demand is less than the minimum scaling step size. If you use a capacity + // provider with an Auto Scaling group configured with more than one Amazon EC2 + // instance type or Availability Zone, Amazon ECS will scale up by the exact + // minimum scaling step size value and will ignore both the maximum scaling step + // size as well as the capacity demand. MinimumScalingStepSize *int32 // Determines whether to use managed scaling for the capacity provider. @@ -2842,9 +2849,7 @@ type Service struct { // deployment and the ordering of stopping and starting tasks. DeploymentConfiguration *DeploymentConfiguration - // The deployment controller type the service is using. When using the - // DescribeServices API, this field is omitted if the service uses the ECS - // deployment controller type. + // The deployment controller type the service is using. DeploymentController *DeploymentController // The current state of deployments for the service. diff --git a/service/guardduty/api_op_CreateDetector.go b/service/guardduty/api_op_CreateDetector.go index 54961bc2b08..7840a0ddf16 100644 --- a/service/guardduty/api_op_CreateDetector.go +++ b/service/guardduty/api_op_CreateDetector.go @@ -59,6 +59,10 @@ type CreateDetectorOutput struct { // The unique ID of the created detector. DetectorId *string + // Specifies the data sources that couldn't be enabled when GuardDuty was enabled + // for the first time. + UnprocessedDataSources *types.UnprocessedDataSourcesResult + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/guardduty/api_op_DescribeMalwareScans.go b/service/guardduty/api_op_DescribeMalwareScans.go index b387631f34b..f0676f2ee84 100644 --- a/service/guardduty/api_op_DescribeMalwareScans.go +++ b/service/guardduty/api_op_DescribeMalwareScans.go @@ -12,7 +12,9 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Returns a list of malware scans. +// Returns a list of malware scans. Each member account can view the malware scans +// for their own accounts. An administrator can view the malware scans for all the +// member accounts. func (c *Client) DescribeMalwareScans(ctx context.Context, params *DescribeMalwareScansInput, optFns ...func(*Options)) (*DescribeMalwareScansOutput, error) { if params == nil { params = &DescribeMalwareScansInput{} diff --git a/service/guardduty/api_op_DisassociateMembers.go b/service/guardduty/api_op_DisassociateMembers.go index 8f735f8e288..be53c30ef4e 100644 --- a/service/guardduty/api_op_DisassociateMembers.go +++ b/service/guardduty/api_op_DisassociateMembers.go @@ -11,8 +11,8 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Disassociates GuardDuty member accounts (to the current GuardDuty administrator -// account) specified by the account IDs. +// Disassociates GuardDuty member accounts (to the current administrator account) +// specified by the account IDs. func (c *Client) DisassociateMembers(ctx context.Context, params *DisassociateMembersInput, optFns ...func(*Options)) (*DisassociateMembersOutput, error) { if params == nil { params = &DisassociateMembersInput{} diff --git a/service/guardduty/api_op_GetMalwareScanSettings.go b/service/guardduty/api_op_GetMalwareScanSettings.go index 59a5cb3aee2..37e23de73f2 100644 --- a/service/guardduty/api_op_GetMalwareScanSettings.go +++ b/service/guardduty/api_op_GetMalwareScanSettings.go @@ -39,7 +39,7 @@ type GetMalwareScanSettingsInput struct { type GetMalwareScanSettingsOutput struct { - // An enum value representing possible snapshot preservations. + // An enum value representing possible snapshot preservation settings. EbsSnapshotPreservation types.EbsSnapshotPreservation // Represents the criteria to be used in the filter for scanning resources. diff --git a/service/guardduty/api_op_ListMembers.go b/service/guardduty/api_op_ListMembers.go index 33e2fbf28e9..e0cff55458a 100644 --- a/service/guardduty/api_op_ListMembers.go +++ b/service/guardduty/api_op_ListMembers.go @@ -48,6 +48,9 @@ type ListMembersInput struct { // Specifies whether to only return associated members or to return all members // (including members who haven't been invited yet or have been disassociated). + // Member accounts must have been previously associated with the GuardDuty + // administrator account using Create Members + // (https://docs.aws.amazon.com/guardduty/latest/APIReference/API_CreateMembers.html). OnlyAssociated *string noSmithyDocumentSerde diff --git a/service/guardduty/api_op_UpdateMalwareScanSettings.go b/service/guardduty/api_op_UpdateMalwareScanSettings.go index 2f6fde59d04..f09990c0eac 100644 --- a/service/guardduty/api_op_UpdateMalwareScanSettings.go +++ b/service/guardduty/api_op_UpdateMalwareScanSettings.go @@ -35,7 +35,7 @@ type UpdateMalwareScanSettingsInput struct { // This member is required. DetectorId *string - // An enum value representing possible snapshot preservations. + // An enum value representing possible snapshot preservation settings. EbsSnapshotPreservation types.EbsSnapshotPreservation // Represents the criteria to be used in the filter for selecting resources to diff --git a/service/guardduty/deserializers.go b/service/guardduty/deserializers.go index 141e9d1fc29..bca83e0956c 100644 --- a/service/guardduty/deserializers.go +++ b/service/guardduty/deserializers.go @@ -423,6 +423,11 @@ func awsRestjson1_deserializeOpDocumentCreateDetectorOutput(v **CreateDetectorOu sv.DetectorId = ptr.String(jtv) } + case "unprocessedDataSources": + if err := awsRestjson1_deserializeDocumentUnprocessedDataSourcesResult(&sv.UnprocessedDataSources, value); err != nil { + return err + } + default: _, _ = key, value @@ -10702,6 +10707,15 @@ func awsRestjson1_deserializeDocumentEbsVolumesResult(v **types.EbsVolumesResult for key, value := range shape { switch key { + case "reason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Reason = ptr.String(jtv) + } + case "status": if value != nil { jtv, ok := value.(string) @@ -16290,6 +16304,42 @@ func awsRestjson1_deserializeDocumentUnprocessedAccounts(v *[]types.UnprocessedA return nil } +func awsRestjson1_deserializeDocumentUnprocessedDataSourcesResult(v **types.UnprocessedDataSourcesResult, 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.UnprocessedDataSourcesResult + if *v == nil { + sv = &types.UnprocessedDataSourcesResult{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "malwareProtection": + if err := awsRestjson1_deserializeDocumentMalwareProtectionConfigurationResult(&sv.MalwareProtection, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentUsageAccountResult(v **types.UsageAccountResult, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/guardduty/doc.go b/service/guardduty/doc.go index 749a745dfd3..4ca6ca4fb4a 100644 --- a/service/guardduty/doc.go +++ b/service/guardduty/doc.go @@ -4,20 +4,21 @@ // Amazon GuardDuty. // // Amazon GuardDuty is a continuous security monitoring service that analyzes and -// processes the following data sources: VPC Flow Logs, AWS CloudTrail management -// event logs, CloudTrail S3 data event logs, EKS audit logs, and DNS logs. It uses -// threat intelligence feeds (such as lists of malicious IPs and domains) and -// machine learning to identify unexpected, potentially unauthorized, and malicious -// activity within your Amazon Web Services environment. This can include issues -// like escalations of privileges, uses of exposed credentials, or communication -// with malicious IPs, URLs, or domains. For example, GuardDuty can detect -// compromised EC2 instances that serve malware or mine bitcoin. GuardDuty also -// monitors Amazon Web Services account access behavior for signs of compromise. -// Some examples of this are unauthorized infrastructure deployments such as EC2 -// instances deployed in a Region that has never been used, or unusual API calls -// like a password policy change to reduce password strength. GuardDuty informs you -// of the status of your Amazon Web Services environment by producing security -// findings that you can view in the GuardDuty console or through Amazon CloudWatch -// events. For more information, see the Amazon GuardDuty User Guide +// processes the following data sources: VPC flow logs, Amazon Web Services +// CloudTrail management event logs, CloudTrail S3 data event logs, EKS audit logs, +// and DNS logs. It uses threat intelligence feeds (such as lists of malicious IPs +// and domains) and machine learning to identify unexpected, potentially +// unauthorized, and malicious activity within your Amazon Web Services +// environment. This can include issues like escalations of privileges, uses of +// exposed credentials, or communication with malicious IPs, URLs, or domains. For +// example, GuardDuty can detect compromised EC2 instances that serve malware or +// mine bitcoin. GuardDuty also monitors Amazon Web Services account access +// behavior for signs of compromise. Some examples of this are unauthorized +// infrastructure deployments such as EC2 instances deployed in a Region that has +// never been used, or unusual API calls like a password policy change to reduce +// password strength. GuardDuty informs you of the status of your Amazon Web +// Services environment by producing security findings that you can view in the +// GuardDuty console or through Amazon CloudWatch events. For more information, see +// the Amazon GuardDuty User Guide // (https://docs.aws.amazon.com/guardduty/latest/ug/what-is-guardduty.html) . package guardduty diff --git a/service/guardduty/types/types.go b/service/guardduty/types/types.go index 45ada1b5f42..7cf84c67cd2 100644 --- a/service/guardduty/types/types.go +++ b/service/guardduty/types/types.go @@ -413,8 +413,8 @@ type DataSourceFreeTrial struct { // member account. type DataSourcesFreeTrial struct { - // Describes whether any AWS CloudTrail management event logs are enabled as data - // sources. + // Describes whether any Amazon Web Services CloudTrail management event logs are + // enabled as data sources. CloudTrail *DataSourceFreeTrial // Describes whether any DNS logs are enabled as data sources. @@ -563,6 +563,10 @@ type EbsVolumeScanDetails struct { // Describes the configuration of scanning EBS volumes as a data source. type EbsVolumesResult struct { + // Specifies the reason why scanning EBS volumes (Malware Protection) was not + // enabled as a data source. + Reason *string + // Describes whether scanning EBS volumes is enabled as a data source. Status DataSourceStatus @@ -697,7 +701,9 @@ type FilterCriteria struct { } // Represents a condition that when matched will be added to the response of the -// operation. +// operation. Irrespective of using any filter criteria, an administrator account +// can view the scan entries for all of its member accounts. However, each member +// account can view the scan entries only for their own account. type FilterCriterion struct { // An enum value representing possible scan properties to match with given scan @@ -2067,6 +2073,16 @@ type UnprocessedAccount struct { noSmithyDocumentSerde } +// Specifies the names of the data sources that couldn't be enabled. +type UnprocessedDataSourcesResult struct { + + // An object that contains information on the status of all Malware Protection data + // sources. + MalwareProtection *MalwareProtectionConfigurationResult + + noSmithyDocumentSerde +} + // Contains information on the total of usage based on account IDs. type UsageAccountResult struct { diff --git a/service/iam/api_op_DeleteLoginProfile.go b/service/iam/api_op_DeleteLoginProfile.go index 80b63c7a38b..32f77feade1 100644 --- a/service/iam/api_op_DeleteLoginProfile.go +++ b/service/iam/api_op_DeleteLoginProfile.go @@ -10,17 +10,17 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Deletes the password for the specified IAM user, which terminates the user's -// ability to access Amazon Web Services services through the Amazon Web Services -// Management Console. You can use the CLI, the Amazon Web Services API, or the -// Users page in the IAM console to delete a password for any IAM user. You can use -// ChangePassword to update, but not delete, your own password in the My Security -// Credentials page in the Amazon Web Services Management Console. Deleting a -// user's password does not prevent a user from accessing Amazon Web Services -// through the command line interface or the API. To prevent all user access, you -// must also either make any access keys inactive or delete them. For more -// information about making keys inactive or deleting them, see UpdateAccessKey and -// DeleteAccessKey. +// Deletes the password for the specified IAM user, For more information, see +// Managing passwords for IAM users +// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_passwords_admin-change-user.html). +// You can use the CLI, the Amazon Web Services API, or the Users page in the IAM +// console to delete a password for any IAM user. You can use ChangePassword to +// update, but not delete, your own password in the My Security Credentials page in +// the Amazon Web Services Management Console. Deleting a user's password does not +// prevent a user from accessing Amazon Web Services through the command line +// interface or the API. To prevent all user access, you must also either make any +// access keys inactive or delete them. For more information about making keys +// inactive or deleting them, see UpdateAccessKey and DeleteAccessKey. func (c *Client) DeleteLoginProfile(ctx context.Context, params *DeleteLoginProfileInput, optFns ...func(*Options)) (*DeleteLoginProfileOutput, error) { if params == nil { params = &DeleteLoginProfileInput{} diff --git a/service/iam/types/types.go b/service/iam/types/types.go index 0fada10380a..a6e3e431473 100644 --- a/service/iam/types/types.go +++ b/service/iam/types/types.go @@ -37,7 +37,7 @@ type AccessDetail struct { // from which an authenticated principal last attempted to access the service. // Amazon Web Services does not report unauthenticated requests. This field is null // if no principals (IAM users, IAM roles, or root users) in the reported - // Organizations entity attempted to access the service within the reporting period + // Organizations entity attempted to access the service within the tracking period // (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period). EntityPath *string @@ -45,18 +45,18 @@ type AccessDetail struct { // (http://www.iso.org/iso/iso8601), when an authenticated principal most recently // attempted to access the service. Amazon Web Services does not report // unauthenticated requests. This field is null if no principals in the reported - // Organizations entity attempted to access the service within the reporting period + // Organizations entity attempted to access the service within the tracking period // (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period). LastAuthenticatedTime *time.Time // The Region where the last service access attempt occurred. This field is null if // no principals in the reported Organizations entity attempted to access the - // service within the reporting period + // service within the tracking period // (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period). Region *string // The number of accounts with authenticated principals (root users, IAM users, and - // IAM roles) that attempted to access the service in the reporting period. + // IAM roles) that attempted to access the service in the tracking period. TotalAuthenticatedEntities *int32 noSmithyDocumentSerde @@ -273,7 +273,7 @@ type EntityDetails struct { // (http://www.iso.org/iso/iso8601), when the authenticated entity last attempted // to access Amazon Web Services. Amazon Web Services does not report // unauthenticated requests. This field is null if no IAM entities attempted to - // access the service within the reporting period + // access the service within the tracking period // (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period). LastAuthenticated *time.Time @@ -1359,33 +1359,33 @@ type ServiceLastAccessed struct { // (http://www.iso.org/iso/iso8601), when an authenticated entity most recently // attempted to access the service. Amazon Web Services does not report // unauthenticated requests. This field is null if no IAM entities attempted to - // access the service within the reporting period + // access the service within the tracking period // (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period). LastAuthenticated *time.Time // The ARN of the authenticated entity (user or role) that last attempted to access // the service. Amazon Web Services does not report unauthenticated requests. This // field is null if no IAM entities attempted to access the service within the - // reporting period + // tracking period // (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period). LastAuthenticatedEntity *string // The Region from which the authenticated entity (user or role) last attempted to // access the service. Amazon Web Services does not report unauthenticated // requests. This field is null if no IAM entities attempted to access the service - // within the reporting period + // within the tracking period // (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period). LastAuthenticatedRegion *string // The total number of authenticated principals (root user, IAM users, or IAM // roles) that have attempted to access the service. This field is null if no - // principals attempted to access the service within the reporting period + // principals attempted to access the service within the tracking period // (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period). TotalAuthenticatedEntities *int32 // An object that contains details about the most recent attempt to access a // tracked action within the service. This field is null if there no tracked - // actions or if the principal did not use the tracked actions within the reporting + // actions or if the principal did not use the tracked actions within the tracking // period // (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period). // This field is also null if the report was generated at the service level and not @@ -1649,7 +1649,7 @@ type TrackedActionLastAccessed struct { // The Region from which the authenticated entity (user or role) last attempted to // access the tracked action. Amazon Web Services does not report unauthenticated // requests. This field is null if no IAM entities attempted to access the service - // within the reporting period + // within the tracking period // (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period). LastAccessedRegion *string @@ -1657,7 +1657,7 @@ type TrackedActionLastAccessed struct { // (http://www.iso.org/iso/iso8601), when an authenticated entity most recently // attempted to access the tracked service. Amazon Web Services does not report // unauthenticated requests. This field is null if no IAM entities attempted to - // access the service within the reporting period + // access the service within the tracking period // (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period). LastAccessedTime *time.Time diff --git a/service/iotfleetwise/api_op_CreateCampaign.go b/service/iotfleetwise/api_op_CreateCampaign.go index 924fa9dd74c..b784dcfd6c7 100644 --- a/service/iotfleetwise/api_op_CreateCampaign.go +++ b/service/iotfleetwise/api_op_CreateCampaign.go @@ -64,8 +64,11 @@ type CreateCampaignInput struct { // it's not specified, SNAPPY is used. Default: SNAPPY Compression types.Compression - // (Optional) A list of vehicle attributes to associate with a campaign. Default: - // An empty array + // (Optional) A list of vehicle attributes to associate with a campaign. Enrich the + // data with specified vehicle attributes. For example, add make and model to the + // campaign, and Amazon Web Services IoT FleetWise will associate the data with + // those attributes as dimensions in Amazon Timestream. You can then query the data + // against make and model. Default: An empty array DataExtraDimensions []string // An optional description of the campaign to help identify its purpose. diff --git a/service/iotfleetwise/doc.go b/service/iotfleetwise/doc.go index 8ff09a67e07..f789a8e8db6 100644 --- a/service/iotfleetwise/doc.go +++ b/service/iotfleetwise/doc.go @@ -3,21 +3,12 @@ // Package iotfleetwise provides the API client, operations, and parameter types // for AWS IoT FleetWise. // -// Amazon Web Services IoT FleetWise is in preview release and is subject to -// change. We recommend that you use the service only with test data, and not in -// production environments. While Amazon Web Services IoT FleetWise is in preview, -// you must download the preview Amazon Web Services SDK and CLI to use the API -// operations for this service. These API operations aren't available in the public -// Amazon Web Services SDK or CLI. For more information, see Preview Amazon Web -// Services SDK and CLI -// (https://docs.aws.amazon.com/iot-fleetwise/latest/developerguide/preview-sdk-cli.html) -// in the Amazon Web Services IoT FleetWise Developer Guide. Amazon Web Services -// IoT FleetWise is a fully managed service that you can use to collect, model, and -// transfer vehicle data to the Amazon Web Services cloud at scale. With Amazon Web -// Services IoT FleetWise, you can standardize all of your vehicle data models, -// independent of the in-vehicle communication architecture, and define data -// collection rules to transfer only high-value data to the cloud. For more -// information, see What is Amazon Web Services IoT FleetWise? +// Amazon Web Services IoT FleetWise is a fully managed service that you can use to +// collect, model, and transfer vehicle data to the Amazon Web Services cloud at +// scale. With Amazon Web Services IoT FleetWise, you can standardize all of your +// vehicle data models, independent of the in-vehicle communication architecture, +// and define data collection rules to transfer only high-value data to the cloud. +// For more information, see What is Amazon Web Services IoT FleetWise? // (https://docs.aws.amazon.com/iot-fleetwise/latest/developerguide/) in the Amazon // Web Services IoT FleetWise Developer Guide. package iotfleetwise diff --git a/service/kms/internal/endpoints/endpoints.go b/service/kms/internal/endpoints/endpoints.go index 58dc054960b..148d306fa0c 100644 --- a/service/kms/internal/endpoints/endpoints.go +++ b/service/kms/internal/endpoints/endpoints.go @@ -369,6 +369,15 @@ var defaultPartitions = endpoints.Partitions{ }, Deprecated: aws.TrueTernary, }, + endpoints.EndpointKey{ + Region: "eu-south-2-fips", + }: endpoints.Endpoint{ + Hostname: "kms-fips.eu-south-2.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "eu-south-2", + }, + Deprecated: aws.TrueTernary, + }, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, diff --git a/service/medialive/deserializers.go b/service/medialive/deserializers.go index fb301e9da59..d496614e3b1 100644 --- a/service/medialive/deserializers.go +++ b/service/medialive/deserializers.go @@ -14288,6 +14288,11 @@ func awsRestjson1_deserializeDocumentAvailSettings(v **types.AvailSettings, valu for key, value := range shape { switch key { + case "esam": + if err := awsRestjson1_deserializeDocumentEsam(&sv.Esam, value); err != nil { + return err + } + case "scte35SpliceInsert": if err := awsRestjson1_deserializeDocumentScte35SpliceInsert(&sv.Scte35SpliceInsert, value); err != nil { return err @@ -17138,6 +17143,95 @@ func awsRestjson1_deserializeDocumentEncoderSettings(v **types.EncoderSettings, return nil } +func awsRestjson1_deserializeDocumentEsam(v **types.Esam, 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.Esam + if *v == nil { + sv = &types.Esam{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "acquisitionPointId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMax256 to be of type string, got %T instead", value) + } + sv.AcquisitionPointId = ptr.String(jtv) + } + + case "adAvailOffset": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected __integerMinNegative1000Max1000 to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.AdAvailOffset = int32(i64) + } + + case "passwordParam": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.PasswordParam = ptr.String(jtv) + } + + case "poisEndpoint": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.PoisEndpoint = ptr.String(jtv) + } + + case "username": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.Username = ptr.String(jtv) + } + + case "zoneIdentity": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMax256 to be of type string, got %T instead", value) + } + sv.ZoneIdentity = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentFailoverCondition(v **types.FailoverCondition, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -26685,6 +26779,11 @@ func awsRestjson1_deserializeDocumentScheduleActionSettings(v **types.ScheduleAc return err } + case "scte35InputSettings": + if err := awsRestjson1_deserializeDocumentScte35InputScheduleActionSettings(&sv.Scte35InputSettings, value); err != nil { + return err + } + case "scte35ReturnToNetworkSettings": if err := awsRestjson1_deserializeDocumentScte35ReturnToNetworkScheduleActionSettings(&sv.Scte35ReturnToNetworkSettings, value); err != nil { return err @@ -27072,6 +27171,55 @@ func awsRestjson1_deserializeDocumentScte35DescriptorSettings(v **types.Scte35De return nil } +func awsRestjson1_deserializeDocumentScte35InputScheduleActionSettings(v **types.Scte35InputScheduleActionSettings, 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.Scte35InputScheduleActionSettings + if *v == nil { + sv = &types.Scte35InputScheduleActionSettings{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "inputAttachmentNameReference": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.InputAttachmentNameReference = ptr.String(jtv) + } + + case "mode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Scte35InputMode to be of type string, got %T instead", value) + } + sv.Mode = types.Scte35InputMode(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentScte35ReturnToNetworkScheduleActionSettings(v **types.Scte35ReturnToNetworkScheduleActionSettings, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/medialive/serializers.go b/service/medialive/serializers.go index 5a7f99f8e31..efcae4b8bab 100644 --- a/service/medialive/serializers.go +++ b/service/medialive/serializers.go @@ -5458,6 +5458,13 @@ func awsRestjson1_serializeDocumentAvailSettings(v *types.AvailSettings, value s object := value.Object() defer object.Close() + if v.Esam != nil { + ok := object.Key("esam") + if err := awsRestjson1_serializeDocumentEsam(v.Esam, ok); err != nil { + return err + } + } + if v.Scte35SpliceInsert != nil { ok := object.Key("scte35SpliceInsert") if err := awsRestjson1_serializeDocumentScte35SpliceInsert(v.Scte35SpliceInsert, ok); err != nil { @@ -6561,6 +6568,43 @@ func awsRestjson1_serializeDocumentEncoderSettings(v *types.EncoderSettings, val return nil } +func awsRestjson1_serializeDocumentEsam(v *types.Esam, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AcquisitionPointId != nil { + ok := object.Key("acquisitionPointId") + ok.String(*v.AcquisitionPointId) + } + + if v.AdAvailOffset != 0 { + ok := object.Key("adAvailOffset") + ok.Integer(v.AdAvailOffset) + } + + if v.PasswordParam != nil { + ok := object.Key("passwordParam") + ok.String(*v.PasswordParam) + } + + if v.PoisEndpoint != nil { + ok := object.Key("poisEndpoint") + ok.String(*v.PoisEndpoint) + } + + if v.Username != nil { + ok := object.Key("username") + ok.String(*v.Username) + } + + if v.ZoneIdentity != nil { + ok := object.Key("zoneIdentity") + ok.String(*v.ZoneIdentity) + } + + return nil +} + func awsRestjson1_serializeDocumentFailoverCondition(v *types.FailoverCondition, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -9883,6 +9927,13 @@ func awsRestjson1_serializeDocumentScheduleActionSettings(v *types.ScheduleActio } } + if v.Scte35InputSettings != nil { + ok := object.Key("scte35InputSettings") + if err := awsRestjson1_serializeDocumentScte35InputScheduleActionSettings(v.Scte35InputSettings, ok); err != nil { + return err + } + } + if v.Scte35ReturnToNetworkSettings != nil { ok := object.Key("scte35ReturnToNetworkSettings") if err := awsRestjson1_serializeDocumentScte35ReturnToNetworkScheduleActionSettings(v.Scte35ReturnToNetworkSettings, ok); err != nil { @@ -10052,6 +10103,23 @@ func awsRestjson1_serializeDocumentScte35DescriptorSettings(v *types.Scte35Descr return nil } +func awsRestjson1_serializeDocumentScte35InputScheduleActionSettings(v *types.Scte35InputScheduleActionSettings, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.InputAttachmentNameReference != nil { + ok := object.Key("inputAttachmentNameReference") + ok.String(*v.InputAttachmentNameReference) + } + + if len(v.Mode) > 0 { + ok := object.Key("mode") + ok.String(string(v.Mode)) + } + + return nil +} + func awsRestjson1_serializeDocumentScte35ReturnToNetworkScheduleActionSettings(v *types.Scte35ReturnToNetworkScheduleActionSettings, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/medialive/types/enums.go b/service/medialive/types/enums.go index 904e88d8b18..f7783a7aa18 100644 --- a/service/medialive/types/enums.go +++ b/service/medialive/types/enums.go @@ -4654,6 +4654,24 @@ func (Scte35DeviceRestrictions) Values() []Scte35DeviceRestrictions { } } +type Scte35InputMode string + +// Enum values for Scte35InputMode +const ( + Scte35InputModeFixed Scte35InputMode = "FIXED" + Scte35InputModeFollowActive Scte35InputMode = "FOLLOW_ACTIVE" +) + +// Values returns all known values for Scte35InputMode. 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 (Scte35InputMode) Values() []Scte35InputMode { + return []Scte35InputMode{ + "FIXED", + "FOLLOW_ACTIVE", + } +} + type Scte35NoRegionalBlackoutFlag string // Enum values for Scte35NoRegionalBlackoutFlag diff --git a/service/medialive/types/types.go b/service/medialive/types/types.go index 3d74addc130..98101a781c1 100644 --- a/service/medialive/types/types.go +++ b/service/medialive/types/types.go @@ -509,6 +509,9 @@ type AvailConfiguration struct { // Avail Settings type AvailSettings struct { + // Settings for the Esam + Esam *Esam + // Scte35 Splice Insert Scte35SpliceInsert *Scte35SpliceInsert @@ -1496,6 +1499,43 @@ type EncoderSettings struct { noSmithyDocumentSerde } +// Settings for the Esam +type Esam struct { + + // Sent as acquisitionPointIdentity to identify the MediaLive channel to the POIS. + // + // This member is required. + AcquisitionPointId *string + + // The URL of the signal conditioner endpoint on the Placement Opportunity + // Information System (POIS). MediaLive sends SignalProcessingEvents here when + // SCTE-35 messages are read. + // + // This member is required. + PoisEndpoint *string + + // When specified, this offset (in milliseconds) is added to the input Ad Avail PTS + // time. This only applies to embedded SCTE 104/35 messages and does not apply to + // OOB messages. + AdAvailOffset int32 + + // Password if credentials are required to access the POIS endpoint. This is a + // reference to an AWS parameter store name from which the password can be + // retrieved. AWS Parameter store format: "ssm://" + PasswordParam *string + + // Username if credentials are required to access the POIS endpoint. This can be + // either a plaintext username, or a reference to an AWS parameter store name from + // which the username can be retrieved. AWS Parameter store format: "ssm://" + Username *string + + // Optional data sent as zoneIdentity to identify the MediaLive channel to the + // POIS. + ZoneIdentity *string + + noSmithyDocumentSerde +} + // Failover Condition settings. There can be multiple failover conditions inside // AutomaticInputFailoverSettings. type FailoverCondition struct { @@ -4860,6 +4900,9 @@ type ScheduleActionSettings struct { // Action to pause or unpause one or both channel pipelines PauseStateSettings *PauseStateScheduleActionSettings + // Action to specify scte35 input + Scte35InputSettings *Scte35InputScheduleActionSettings + // Action to insert SCTE-35 return_to_network message Scte35ReturnToNetworkSettings *Scte35ReturnToNetworkScheduleActionSettings @@ -4997,6 +5040,21 @@ type Scte35DescriptorSettings struct { noSmithyDocumentSerde } +// Settings for the "scte35 input" action +type Scte35InputScheduleActionSettings struct { + + // Whether the SCTE-35 input should be the active input or a fixed input. + // + // This member is required. + Mode Scte35InputMode + + // In fixed mode, enter the name of the input attachment that you want to use as a + // SCTE-35 input. (Don't enter the ID of the input.)" + InputAttachmentNameReference *string + + noSmithyDocumentSerde +} + // Settings for a SCTE-35 return_to_network message. type Scte35ReturnToNetworkScheduleActionSettings struct { diff --git a/service/medialive/validators.go b/service/medialive/validators.go index 5c8fe6435c2..db8615ff67f 100644 --- a/service/medialive/validators.go +++ b/service/medialive/validators.go @@ -1722,6 +1722,40 @@ func validateAvailBlanking(v *types.AvailBlanking) error { } } +func validateAvailConfiguration(v *types.AvailConfiguration) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AvailConfiguration"} + if v.AvailSettings != nil { + if err := validateAvailSettings(v.AvailSettings); err != nil { + invalidParams.AddNested("AvailSettings", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateAvailSettings(v *types.AvailSettings) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AvailSettings"} + if v.Esam != nil { + if err := validateEsam(v.Esam); err != nil { + invalidParams.AddNested("Esam", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateBatchScheduleActionCreateRequest(v *types.BatchScheduleActionCreateRequest) error { if v == nil { return nil @@ -1956,6 +1990,11 @@ func validateEncoderSettings(v *types.EncoderSettings) error { invalidParams.AddNested("AvailBlanking", err.(smithy.InvalidParamsError)) } } + if v.AvailConfiguration != nil { + if err := validateAvailConfiguration(v.AvailConfiguration); err != nil { + invalidParams.AddNested("AvailConfiguration", err.(smithy.InvalidParamsError)) + } + } if v.BlackoutSlate != nil { if err := validateBlackoutSlate(v.BlackoutSlate); err != nil { invalidParams.AddNested("BlackoutSlate", err.(smithy.InvalidParamsError)) @@ -2004,6 +2043,24 @@ func validateEncoderSettings(v *types.EncoderSettings) error { } } +func validateEsam(v *types.Esam) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "Esam"} + if v.AcquisitionPointId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AcquisitionPointId")) + } + if v.PoisEndpoint == nil { + invalidParams.Add(smithy.NewErrParamRequired("PoisEndpoint")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateFailoverCondition(v *types.FailoverCondition) error { if v == nil { return nil @@ -2821,6 +2878,11 @@ func validateScheduleActionSettings(v *types.ScheduleActionSettings) error { invalidParams.AddNested("PauseStateSettings", err.(smithy.InvalidParamsError)) } } + if v.Scte35InputSettings != nil { + if err := validateScte35InputScheduleActionSettings(v.Scte35InputSettings); err != nil { + invalidParams.AddNested("Scte35InputSettings", err.(smithy.InvalidParamsError)) + } + } if v.Scte35ReturnToNetworkSettings != nil { if err := validateScte35ReturnToNetworkScheduleActionSettings(v.Scte35ReturnToNetworkSettings); err != nil { invalidParams.AddNested("Scte35ReturnToNetworkSettings", err.(smithy.InvalidParamsError)) @@ -2932,6 +2994,21 @@ func validateScte35DescriptorSettings(v *types.Scte35DescriptorSettings) error { } } +func validateScte35InputScheduleActionSettings(v *types.Scte35InputScheduleActionSettings) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "Scte35InputScheduleActionSettings"} + if len(v.Mode) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Mode")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateScte35ReturnToNetworkScheduleActionSettings(v *types.Scte35ReturnToNetworkScheduleActionSettings) error { if v == nil { return nil diff --git a/service/mediapackagevod/deserializers.go b/service/mediapackagevod/deserializers.go index bf5b65e1b15..707ca6a822d 100644 --- a/service/mediapackagevod/deserializers.go +++ b/service/mediapackagevod/deserializers.go @@ -3930,6 +3930,55 @@ func awsRestjson1_deserializeDocumentEgressEndpoint(v **types.EgressEndpoint, va return nil } +func awsRestjson1_deserializeDocumentEncryptionContractConfiguration(v **types.EncryptionContractConfiguration, 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.EncryptionContractConfiguration + if *v == nil { + sv = &types.EncryptionContractConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "presetSpeke20Audio": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PresetSpeke20Audio to be of type string, got %T instead", value) + } + sv.PresetSpeke20Audio = types.PresetSpeke20Audio(jtv) + } + + case "presetSpeke20Video": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PresetSpeke20Video to be of type string, got %T instead", value) + } + sv.PresetSpeke20Video = types.PresetSpeke20Video(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentForbiddenException(v **types.ForbiddenException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -4614,6 +4663,11 @@ func awsRestjson1_deserializeDocumentSpekeKeyProvider(v **types.SpekeKeyProvider for key, value := range shape { switch key { + case "encryptionContractConfiguration": + if err := awsRestjson1_deserializeDocumentEncryptionContractConfiguration(&sv.EncryptionContractConfiguration, value); err != nil { + return err + } + case "roleArn": if value != nil { jtv, ok := value.(string) diff --git a/service/mediapackagevod/serializers.go b/service/mediapackagevod/serializers.go index 6eacaf7a809..9b2dbc74d86 100644 --- a/service/mediapackagevod/serializers.go +++ b/service/mediapackagevod/serializers.go @@ -1451,6 +1451,23 @@ func awsRestjson1_serializeDocumentEgressAccessLogs(v *types.EgressAccessLogs, v return nil } +func awsRestjson1_serializeDocumentEncryptionContractConfiguration(v *types.EncryptionContractConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.PresetSpeke20Audio) > 0 { + ok := object.Key("presetSpeke20Audio") + ok.String(string(v.PresetSpeke20Audio)) + } + + if len(v.PresetSpeke20Video) > 0 { + ok := object.Key("presetSpeke20Video") + ok.String(string(v.PresetSpeke20Video)) + } + + return nil +} + func awsRestjson1_serializeDocumentHlsEncryption(v *types.HlsEncryption, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -1613,6 +1630,13 @@ func awsRestjson1_serializeDocumentSpekeKeyProvider(v *types.SpekeKeyProvider, v object := value.Object() defer object.Close() + if v.EncryptionContractConfiguration != nil { + ok := object.Key("encryptionContractConfiguration") + if err := awsRestjson1_serializeDocumentEncryptionContractConfiguration(v.EncryptionContractConfiguration, ok); err != nil { + return err + } + } + if v.RoleArn != nil { ok := object.Key("roleArn") ok.String(*v.RoleArn) diff --git a/service/mediapackagevod/types/enums.go b/service/mediapackagevod/types/enums.go index e57cd801be0..07489f3e5ed 100644 --- a/service/mediapackagevod/types/enums.go +++ b/service/mediapackagevod/types/enums.go @@ -74,6 +74,64 @@ func (ManifestLayout) Values() []ManifestLayout { } } +type PresetSpeke20Audio string + +// Enum values for PresetSpeke20Audio +const ( + PresetSpeke20AudioPresetAudio1 PresetSpeke20Audio = "PRESET-AUDIO-1" + PresetSpeke20AudioPresetAudio2 PresetSpeke20Audio = "PRESET-AUDIO-2" + PresetSpeke20AudioPresetAudio3 PresetSpeke20Audio = "PRESET-AUDIO-3" + PresetSpeke20AudioShared PresetSpeke20Audio = "SHARED" + PresetSpeke20AudioUnencrypted PresetSpeke20Audio = "UNENCRYPTED" +) + +// Values returns all known values for PresetSpeke20Audio. 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 (PresetSpeke20Audio) Values() []PresetSpeke20Audio { + return []PresetSpeke20Audio{ + "PRESET-AUDIO-1", + "PRESET-AUDIO-2", + "PRESET-AUDIO-3", + "SHARED", + "UNENCRYPTED", + } +} + +type PresetSpeke20Video string + +// Enum values for PresetSpeke20Video +const ( + PresetSpeke20VideoPresetVideo1 PresetSpeke20Video = "PRESET-VIDEO-1" + PresetSpeke20VideoPresetVideo2 PresetSpeke20Video = "PRESET-VIDEO-2" + PresetSpeke20VideoPresetVideo3 PresetSpeke20Video = "PRESET-VIDEO-3" + PresetSpeke20VideoPresetVideo4 PresetSpeke20Video = "PRESET-VIDEO-4" + PresetSpeke20VideoPresetVideo5 PresetSpeke20Video = "PRESET-VIDEO-5" + PresetSpeke20VideoPresetVideo6 PresetSpeke20Video = "PRESET-VIDEO-6" + PresetSpeke20VideoPresetVideo7 PresetSpeke20Video = "PRESET-VIDEO-7" + PresetSpeke20VideoPresetVideo8 PresetSpeke20Video = "PRESET-VIDEO-8" + PresetSpeke20VideoShared PresetSpeke20Video = "SHARED" + PresetSpeke20VideoUnencrypted PresetSpeke20Video = "UNENCRYPTED" +) + +// Values returns all known values for PresetSpeke20Video. 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 (PresetSpeke20Video) Values() []PresetSpeke20Video { + return []PresetSpeke20Video{ + "PRESET-VIDEO-1", + "PRESET-VIDEO-2", + "PRESET-VIDEO-3", + "PRESET-VIDEO-4", + "PRESET-VIDEO-5", + "PRESET-VIDEO-6", + "PRESET-VIDEO-7", + "PRESET-VIDEO-8", + "SHARED", + "UNENCRYPTED", + } +} + type Profile string // Enum values for Profile diff --git a/service/mediapackagevod/types/types.go b/service/mediapackagevod/types/types.go index e43516df8cd..6874d94e5d2 100644 --- a/service/mediapackagevod/types/types.go +++ b/service/mediapackagevod/types/types.go @@ -205,6 +205,30 @@ type EgressEndpoint struct { noSmithyDocumentSerde } +// Use encryptionContractConfiguration to configure one or more content encryption +// keys for your endpoints that use SPEKE 2.0. The encryption contract defines +// which content keys are used to encrypt the audio and video tracks in your +// stream. To configure the encryption contract, specify which audio and video +// encryption presets to use. Note the following considerations when using +// encryptionContractConfiguration: encryptionContractConfiguration can be used for +// DASH endpoints that use SPEKE 2.0. SPEKE 2.0 relies on the CPIX 2.3 +// specification. You must disable key rotation for this endpoint by setting +// keyRotationIntervalSeconds to 0. +type EncryptionContractConfiguration struct { + + // A collection of audio encryption presets. + // + // This member is required. + PresetSpeke20Audio PresetSpeke20Audio + + // A collection of video encryption presets. + // + // This member is required. + PresetSpeke20Video PresetSpeke20Video + + noSmithyDocumentSerde +} + // An HTTP Live Streaming (HLS) encryption configuration. type HlsEncryption struct { @@ -400,6 +424,17 @@ type SpekeKeyProvider struct { // This member is required. Url *string + // Use encryptionContractConfiguration to configure one or more content encryption + // keys for your endpoints that use SPEKE 2.0. The encryption contract defines + // which content keys are used to encrypt the audio and video tracks in your + // stream. To configure the encryption contract, specify which audio and video + // encryption presets to use. Note the following considerations when using + // encryptionContractConfiguration: encryptionContractConfiguration can be used for + // DASH endpoints that use SPEKE 2.0. SPEKE 2.0 relies on the CPIX 2.3 + // specification. You must disable key rotation for this endpoint by setting + // keyRotationIntervalSeconds to 0. + EncryptionContractConfiguration *EncryptionContractConfiguration + noSmithyDocumentSerde } diff --git a/service/mediapackagevod/validators.go b/service/mediapackagevod/validators.go index a3247905e3f..8bc38b8fa3e 100644 --- a/service/mediapackagevod/validators.go +++ b/service/mediapackagevod/validators.go @@ -442,6 +442,24 @@ func validateDashPackage(v *types.DashPackage) error { } } +func validateEncryptionContractConfiguration(v *types.EncryptionContractConfiguration) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "EncryptionContractConfiguration"} + if len(v.PresetSpeke20Audio) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("PresetSpeke20Audio")) + } + if len(v.PresetSpeke20Video) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("PresetSpeke20Video")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateHlsEncryption(v *types.HlsEncryption) error { if v == nil { return nil @@ -525,6 +543,11 @@ func validateSpekeKeyProvider(v *types.SpekeKeyProvider) error { return nil } invalidParams := smithy.InvalidParamsError{Context: "SpekeKeyProvider"} + if v.EncryptionContractConfiguration != nil { + if err := validateEncryptionContractConfiguration(v.EncryptionContractConfiguration); err != nil { + invalidParams.AddNested("EncryptionContractConfiguration", err.(smithy.InvalidParamsError)) + } + } if v.RoleArn == nil { invalidParams.Add(smithy.NewErrParamRequired("RoleArn")) } diff --git a/service/panorama/api_op_CreateJobForDevices.go b/service/panorama/api_op_CreateJobForDevices.go index 0a4ee628291..01370a00627 100644 --- a/service/panorama/api_op_CreateJobForDevices.go +++ b/service/panorama/api_op_CreateJobForDevices.go @@ -11,7 +11,8 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Creates a job to run on one or more devices. +// Creates a job to run on one or more devices. A job can update a device's +// software or reboot it. func (c *Client) CreateJobForDevices(ctx context.Context, params *CreateJobForDevicesInput, optFns ...func(*Options)) (*CreateJobForDevicesOutput, error) { if params == nil { params = &CreateJobForDevicesInput{} @@ -34,16 +35,14 @@ type CreateJobForDevicesInput struct { // This member is required. DeviceIds []string - // Configuration settings for the job. - // - // This member is required. - DeviceJobConfig *types.DeviceJobConfig - // The type of job to run. // // This member is required. JobType types.JobType + // Configuration settings for a software update job. + DeviceJobConfig *types.DeviceJobConfig + noSmithyDocumentSerde } diff --git a/service/panorama/api_op_DescribeApplicationInstance.go b/service/panorama/api_op_DescribeApplicationInstance.go index a5f9e1c040d..7be64a609ea 100644 --- a/service/panorama/api_op_DescribeApplicationInstance.go +++ b/service/panorama/api_op_DescribeApplicationInstance.go @@ -70,6 +70,9 @@ type DescribeApplicationInstanceOutput struct { // The application instance's name. Name *string + // The application instance's state. + RuntimeContextStates []types.ReportedRuntimeContextState + // The application instance's runtime role ARN. RuntimeRoleArn *string diff --git a/service/panorama/api_op_DescribeDeviceJob.go b/service/panorama/api_op_DescribeDeviceJob.go index 989c95270db..b23b3532f9e 100644 --- a/service/panorama/api_op_DescribeDeviceJob.go +++ b/service/panorama/api_op_DescribeDeviceJob.go @@ -61,6 +61,9 @@ type DescribeDeviceJobOutput struct { // The job's ID. JobId *string + // The job's type. + JobType types.JobType + // The job's status. Status types.UpdateProgress diff --git a/service/panorama/api_op_SignalApplicationInstanceNodeInstances.go b/service/panorama/api_op_SignalApplicationInstanceNodeInstances.go new file mode 100644 index 00000000000..517b971535e --- /dev/null +++ b/service/panorama/api_op_SignalApplicationInstanceNodeInstances.go @@ -0,0 +1,128 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package panorama + +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/panorama/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Signal camera nodes to stop or resume. +func (c *Client) SignalApplicationInstanceNodeInstances(ctx context.Context, params *SignalApplicationInstanceNodeInstancesInput, optFns ...func(*Options)) (*SignalApplicationInstanceNodeInstancesOutput, error) { + if params == nil { + params = &SignalApplicationInstanceNodeInstancesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "SignalApplicationInstanceNodeInstances", params, optFns, c.addOperationSignalApplicationInstanceNodeInstancesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*SignalApplicationInstanceNodeInstancesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type SignalApplicationInstanceNodeInstancesInput struct { + + // An application instance ID. + // + // This member is required. + ApplicationInstanceId *string + + // A list of signals. + // + // This member is required. + NodeSignals []types.NodeSignal + + noSmithyDocumentSerde +} + +type SignalApplicationInstanceNodeInstancesOutput struct { + + // An application instance ID. + // + // This member is required. + ApplicationInstanceId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationSignalApplicationInstanceNodeInstancesMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpSignalApplicationInstanceNodeInstances{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpSignalApplicationInstanceNodeInstances{}, 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 = addOpSignalApplicationInstanceNodeInstancesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSignalApplicationInstanceNodeInstances(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_opSignalApplicationInstanceNodeInstances(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "panorama", + OperationName: "SignalApplicationInstanceNodeInstances", + } +} diff --git a/service/panorama/deserializers.go b/service/panorama/deserializers.go index c27b3541fd8..26adb68ae01 100644 --- a/service/panorama/deserializers.go +++ b/service/panorama/deserializers.go @@ -1436,6 +1436,11 @@ func awsRestjson1_deserializeOpDocumentDescribeApplicationInstanceOutput(v **Des sv.Name = ptr.String(jtv) } + case "RuntimeContextStates": + if err := awsRestjson1_deserializeDocumentReportedRuntimeContextStates(&sv.RuntimeContextStates, value); err != nil { + return err + } + case "RuntimeRoleArn": if value != nil { jtv, ok := value.(string) @@ -2242,6 +2247,15 @@ func awsRestjson1_deserializeOpDocumentDescribeDeviceJobOutput(v **DescribeDevic sv.JobId = ptr.String(jtv) } + case "JobType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected JobType to be of type string, got %T instead", value) + } + sv.JobType = types.JobType(jtv) + } + case "Status": if value != nil { jtv, ok := value.(string) @@ -5544,6 +5558,166 @@ func awsRestjson1_deserializeOpErrorRemoveApplicationInstance(response *smithyht } } +type awsRestjson1_deserializeOpSignalApplicationInstanceNodeInstances struct { +} + +func (*awsRestjson1_deserializeOpSignalApplicationInstanceNodeInstances) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpSignalApplicationInstanceNodeInstances) 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, awsRestjson1_deserializeOpErrorSignalApplicationInstanceNodeInstances(response, &metadata) + } + output := &SignalApplicationInstanceNodeInstancesOutput{} + 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 = awsRestjson1_deserializeOpDocumentSignalApplicationInstanceNodeInstancesOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorSignalApplicationInstanceNodeInstances(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("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentSignalApplicationInstanceNodeInstancesOutput(v **SignalApplicationInstanceNodeInstancesOutput, 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 *SignalApplicationInstanceNodeInstancesOutput + if *v == nil { + sv = &SignalApplicationInstanceNodeInstancesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ApplicationInstanceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ApplicationInstanceId to be of type string, got %T instead", value) + } + sv.ApplicationInstanceId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpTagResource struct { } @@ -6336,6 +6510,11 @@ func awsRestjson1_deserializeDocumentApplicationInstance(v **types.ApplicationIn sv.Name = ptr.String(jtv) } + case "RuntimeContextStates": + if err := awsRestjson1_deserializeDocumentReportedRuntimeContextStates(&sv.RuntimeContextStates, value); err != nil { + return err + } + case "Status": if value != nil { jtv, ok := value.(string) @@ -6783,6 +6962,15 @@ func awsRestjson1_deserializeDocumentDeviceJob(v **types.DeviceJob, value interf sv.JobId = ptr.String(jtv) } + case "JobType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected JobType to be of type string, got %T instead", value) + } + sv.JobType = types.JobType(jtv) + } + default: _, _ = key, value @@ -7279,6 +7467,15 @@ func awsRestjson1_deserializeDocumentLatestDeviceJob(v **types.LatestDeviceJob, sv.ImageVersion = ptr.String(jtv) } + case "JobType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected JobType to be of type string, got %T instead", value) + } + sv.JobType = types.JobType(jtv) + } + case "Status": if value != nil { jtv, ok := value.(string) @@ -8909,6 +9106,114 @@ func awsRestjson1_deserializeDocumentPrincipalArnsList(v *[]string, value interf return nil } +func awsRestjson1_deserializeDocumentReportedRuntimeContextState(v **types.ReportedRuntimeContextState, 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.ReportedRuntimeContextState + if *v == nil { + sv = &types.ReportedRuntimeContextState{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DesiredState": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DesiredState to be of type string, got %T instead", value) + } + sv.DesiredState = types.DesiredState(jtv) + } + + case "DeviceReportedStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DeviceReportedStatus to be of type string, got %T instead", value) + } + sv.DeviceReportedStatus = types.DeviceReportedStatus(jtv) + } + + case "DeviceReportedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.DeviceReportedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected TimeStamp to be a JSON Number, got %T instead", value) + + } + } + + case "RuntimeContextName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RuntimeContextName to be of type string, got %T instead", value) + } + sv.RuntimeContextName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentReportedRuntimeContextStates(v *[]types.ReportedRuntimeContextState, 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.ReportedRuntimeContextState + if *v == nil { + cv = []types.ReportedRuntimeContextState{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ReportedRuntimeContextState + destAddr := &col + if err := awsRestjson1_deserializeDocumentReportedRuntimeContextState(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentResourceNotFoundException(v **types.ResourceNotFoundException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/panorama/generated.json b/service/panorama/generated.json index b28c4e84567..a0ed3194d13 100644 --- a/service/panorama/generated.json +++ b/service/panorama/generated.json @@ -38,6 +38,7 @@ "api_op_ProvisionDevice.go", "api_op_RegisterPackageVersion.go", "api_op_RemoveApplicationInstance.go", + "api_op_SignalApplicationInstanceNodeInstances.go", "api_op_TagResource.go", "api_op_UntagResource.go", "api_op_UpdateDeviceMetadata.go", diff --git a/service/panorama/serializers.go b/service/panorama/serializers.go index 7616c6451ba..07fbbbb58c1 100644 --- a/service/panorama/serializers.go +++ b/service/panorama/serializers.go @@ -2109,6 +2109,89 @@ func awsRestjson1_serializeOpHttpBindingsRemoveApplicationInstanceInput(v *Remov return nil } +type awsRestjson1_serializeOpSignalApplicationInstanceNodeInstances struct { +} + +func (*awsRestjson1_serializeOpSignalApplicationInstanceNodeInstances) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpSignalApplicationInstanceNodeInstances) 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.(*SignalApplicationInstanceNodeInstancesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/application-instances/{ApplicationInstanceId}/node-signals") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PUT" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsSignalApplicationInstanceNodeInstancesInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentSignalApplicationInstanceNodeInstancesInput(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 = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsSignalApplicationInstanceNodeInstancesInput(v *SignalApplicationInstanceNodeInstancesInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ApplicationInstanceId == nil || len(*v.ApplicationInstanceId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ApplicationInstanceId must not be empty")} + } + if v.ApplicationInstanceId != nil { + if err := encoder.SetURI("ApplicationInstanceId").String(*v.ApplicationInstanceId); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentSignalApplicationInstanceNodeInstancesInput(v *SignalApplicationInstanceNodeInstancesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.NodeSignals != nil { + ok := object.Key("NodeSignals") + if err := awsRestjson1_serializeDocumentNodeSignalList(v.NodeSignals, ok); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpTagResource struct { } @@ -2484,6 +2567,36 @@ func awsRestjson1_serializeDocumentNetworkPayload(v *types.NetworkPayload, value return nil } +func awsRestjson1_serializeDocumentNodeSignal(v *types.NodeSignal, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.NodeInstanceId != nil { + ok := object.Key("NodeInstanceId") + ok.String(*v.NodeInstanceId) + } + + if len(v.Signal) > 0 { + ok := object.Key("Signal") + ok.String(string(v.Signal)) + } + + return nil +} + +func awsRestjson1_serializeDocumentNodeSignalList(v []types.NodeSignal, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentNodeSignal(&v[i], av); err != nil { + return err + } + } + return nil +} + func awsRestjson1_serializeDocumentNtpPayload(v *types.NtpPayload, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/panorama/types/enums.go b/service/panorama/types/enums.go index 14b1f908e67..73b1bdc0d1d 100644 --- a/service/panorama/types/enums.go +++ b/service/panorama/types/enums.go @@ -77,6 +77,26 @@ func (ConnectionType) Values() []ConnectionType { } } +type DesiredState string + +// Enum values for DesiredState +const ( + DesiredStateRunning DesiredState = "RUNNING" + DesiredStateStopped DesiredState = "STOPPED" + DesiredStateRemoved DesiredState = "REMOVED" +) + +// Values returns all known values for DesiredState. 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 (DesiredState) Values() []DesiredState { + return []DesiredState{ + "RUNNING", + "STOPPED", + "REMOVED", + } +} + type DeviceAggregatedStatus string // Enum values for DeviceAggregatedStatus @@ -90,6 +110,7 @@ const ( DeviceAggregatedStatusOffline DeviceAggregatedStatus = "OFFLINE" DeviceAggregatedStatusLeaseExpired DeviceAggregatedStatus = "LEASE_EXPIRED" DeviceAggregatedStatusUpdateNeeded DeviceAggregatedStatus = "UPDATE_NEEDED" + DeviceAggregatedStatusRebooting DeviceAggregatedStatus = "REBOOTING" ) // Values returns all known values for DeviceAggregatedStatus. Note that this can @@ -106,6 +127,7 @@ func (DeviceAggregatedStatus) Values() []DeviceAggregatedStatus { "OFFLINE", "LEASE_EXPIRED", "UPDATE_NEEDED", + "REBOOTING", } } @@ -151,6 +173,42 @@ func (DeviceConnectionStatus) Values() []DeviceConnectionStatus { } } +type DeviceReportedStatus string + +// Enum values for DeviceReportedStatus +const ( + DeviceReportedStatusStopping DeviceReportedStatus = "STOPPING" + DeviceReportedStatusStopped DeviceReportedStatus = "STOPPED" + DeviceReportedStatusStopError DeviceReportedStatus = "STOP_ERROR" + DeviceReportedStatusRemovalFailed DeviceReportedStatus = "REMOVAL_FAILED" + DeviceReportedStatusRemovalInProgress DeviceReportedStatus = "REMOVAL_IN_PROGRESS" + DeviceReportedStatusStarting DeviceReportedStatus = "STARTING" + DeviceReportedStatusRunning DeviceReportedStatus = "RUNNING" + DeviceReportedStatusInstallError DeviceReportedStatus = "INSTALL_ERROR" + DeviceReportedStatusLaunched DeviceReportedStatus = "LAUNCHED" + DeviceReportedStatusLaunchError DeviceReportedStatus = "LAUNCH_ERROR" + DeviceReportedStatusInstallInProgress DeviceReportedStatus = "INSTALL_IN_PROGRESS" +) + +// Values returns all known values for DeviceReportedStatus. 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 (DeviceReportedStatus) Values() []DeviceReportedStatus { + return []DeviceReportedStatus{ + "STOPPING", + "STOPPED", + "STOP_ERROR", + "REMOVAL_FAILED", + "REMOVAL_IN_PROGRESS", + "STARTING", + "RUNNING", + "INSTALL_ERROR", + "LAUNCHED", + "LAUNCH_ERROR", + "INSTALL_IN_PROGRESS", + } +} + type DeviceStatus string // Enum values for DeviceStatus @@ -215,7 +273,8 @@ type JobType string // Enum values for JobType const ( - JobTypeOta JobType = "OTA" + JobTypeOta JobType = "OTA" + JobTypeReboot JobType = "REBOOT" ) // Values returns all known values for JobType. Note that this can be expanded in @@ -224,6 +283,7 @@ const ( func (JobType) Values() []JobType { return []JobType{ "OTA", + "REBOOT", } } @@ -318,6 +378,7 @@ const ( NodeInstanceStatusRunning NodeInstanceStatus = "RUNNING" NodeInstanceStatusError NodeInstanceStatus = "ERROR" NodeInstanceStatusNotAvailable NodeInstanceStatus = "NOT_AVAILABLE" + NodeInstanceStatusPaused NodeInstanceStatus = "PAUSED" ) // Values returns all known values for NodeInstanceStatus. Note that this can be @@ -328,6 +389,25 @@ func (NodeInstanceStatus) Values() []NodeInstanceStatus { "RUNNING", "ERROR", "NOT_AVAILABLE", + "PAUSED", + } +} + +type NodeSignalValue string + +// Enum values for NodeSignalValue +const ( + NodeSignalValuePause NodeSignalValue = "PAUSE" + NodeSignalValueResume NodeSignalValue = "RESUME" +) + +// Values returns all known values for NodeSignalValue. 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 (NodeSignalValue) Values() []NodeSignalValue { + return []NodeSignalValue{ + "PAUSE", + "RESUME", } } diff --git a/service/panorama/types/types.go b/service/panorama/types/types.go index 980a195263d..2dfb06b62ce 100644 --- a/service/panorama/types/types.go +++ b/service/panorama/types/types.go @@ -43,6 +43,9 @@ type ApplicationInstance struct { // The application instance's name. Name *string + // The application's state. + RuntimeContextStates []ReportedRuntimeContextState + // The application instance's status. Status ApplicationInstanceStatus @@ -133,6 +136,9 @@ type DeviceJob struct { // The job's ID. JobId *string + // The job's type. + JobType JobType + noSmithyDocumentSerde } @@ -208,6 +214,9 @@ type LatestDeviceJob struct { // The target version of the device software. ImageVersion *string + // The job's type. + JobType JobType + // Status of the latest device job. Status UpdateProgress @@ -450,6 +459,22 @@ type NodeOutputPort struct { noSmithyDocumentSerde } +// A signal to a camera node to start or stop processing video. +type NodeSignal struct { + + // The camera node's name, from the application manifest. + // + // This member is required. + NodeInstanceId *string + + // The signal value. + // + // This member is required. + Signal NodeSignalValue + + noSmithyDocumentSerde +} + // Network time protocol (NTP) server settings. Use this option to connect to local // NTP servers instead of pool.ntp.org. type NtpPayload struct { @@ -644,6 +669,32 @@ type PackageVersionOutputConfig struct { noSmithyDocumentSerde } +// An application instance's state. +type ReportedRuntimeContextState struct { + + // The application's desired state. + // + // This member is required. + DesiredState DesiredState + + // The application's reported status. + // + // This member is required. + DeviceReportedStatus DeviceReportedStatus + + // When the device reported the application's state. + // + // This member is required. + DeviceReportedTime *time.Time + + // The device's name. + // + // This member is required. + RuntimeContextName *string + + noSmithyDocumentSerde +} + // A location in Amazon S3. type S3Location struct { diff --git a/service/panorama/validators.go b/service/panorama/validators.go index 7dafc970010..36cc3ad920d 100644 --- a/service/panorama/validators.go +++ b/service/panorama/validators.go @@ -470,6 +470,26 @@ func (m *validateOpRemoveApplicationInstance) HandleInitialize(ctx context.Conte return next.HandleInitialize(ctx, in) } +type validateOpSignalApplicationInstanceNodeInstances struct { +} + +func (*validateOpSignalApplicationInstanceNodeInstances) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpSignalApplicationInstanceNodeInstances) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*SignalApplicationInstanceNodeInstancesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpSignalApplicationInstanceNodeInstancesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpTagResource struct { } @@ -622,6 +642,10 @@ func addOpRemoveApplicationInstanceValidationMiddleware(stack *middleware.Stack) return stack.Initialize.Add(&validateOpRemoveApplicationInstance{}, middleware.After) } +func addOpSignalApplicationInstanceNodeInstancesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpSignalApplicationInstanceNodeInstances{}, middleware.After) +} + func addOpTagResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpTagResource{}, middleware.After) } @@ -733,6 +757,41 @@ func validateNetworkPayload(v *types.NetworkPayload) error { } } +func validateNodeSignal(v *types.NodeSignal) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "NodeSignal"} + if v.NodeInstanceId == nil { + invalidParams.Add(smithy.NewErrParamRequired("NodeInstanceId")) + } + if len(v.Signal) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Signal")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateNodeSignalList(v []types.NodeSignal) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "NodeSignalList"} + for i := range v { + if err := validateNodeSignal(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateNtpPayload(v *types.NtpPayload) error { if v == nil { return nil @@ -902,9 +961,7 @@ func validateOpCreateJobForDevicesInput(v *CreateJobForDevicesInput) error { if v.DeviceIds == nil { invalidParams.Add(smithy.NewErrParamRequired("DeviceIds")) } - if v.DeviceJobConfig == nil { - invalidParams.Add(smithy.NewErrParamRequired("DeviceJobConfig")) - } else if v.DeviceJobConfig != nil { + if v.DeviceJobConfig != nil { if err := validateDeviceJobConfig(v.DeviceJobConfig); err != nil { invalidParams.AddNested("DeviceJobConfig", err.(smithy.InvalidParamsError)) } @@ -1293,6 +1350,28 @@ func validateOpRemoveApplicationInstanceInput(v *RemoveApplicationInstanceInput) } } +func validateOpSignalApplicationInstanceNodeInstancesInput(v *SignalApplicationInstanceNodeInstancesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SignalApplicationInstanceNodeInstancesInput"} + if v.ApplicationInstanceId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ApplicationInstanceId")) + } + if v.NodeSignals == nil { + invalidParams.Add(smithy.NewErrParamRequired("NodeSignals")) + } else if v.NodeSignals != nil { + if err := validateNodeSignalList(v.NodeSignals); err != nil { + invalidParams.AddNested("NodeSignals", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpTagResourceInput(v *TagResourceInput) error { if v == nil { return nil diff --git a/service/rdsdata/api_op_BatchExecuteStatement.go b/service/rdsdata/api_op_BatchExecuteStatement.go index a1f706520a1..787438d6c9a 100644 --- a/service/rdsdata/api_op_BatchExecuteStatement.go +++ b/service/rdsdata/api_op_BatchExecuteStatement.go @@ -79,7 +79,8 @@ type BatchExecuteStatementInput struct { // Array parameters are not supported. ParameterSets [][]types.SqlParameter - // The name of the database schema. + // The name of the database schema. Currently, the schema parameter isn't + // supported. Schema *string // The identifier of a transaction that was started by using the BeginTransaction diff --git a/service/ssm/api_op_CreateAssociation.go b/service/ssm/api_op_CreateAssociation.go index fcb063a43c3..0210106fe8c 100644 --- a/service/ssm/api_op_CreateAssociation.go +++ b/service/ssm/api_op_CreateAssociation.go @@ -159,10 +159,11 @@ type CreateAssociationInput struct { // associations use AUTO mode. SyncCompliance types.AssociationSyncCompliance - // Optional metadata that you assign to a resource. Tags enable you to categorize a - // resource in different ways, such as by purpose, owner, or environment. For - // example, you might want to tag an association to identify the type of resource - // to which it applies, the environment, or the purpose of the association. + // Adds or overwrites one or more tags for a State Manager association. Tags are + // metadata that you can assign to your Amazon Web Services resources. Tags enable + // you to categorize your resources in different ways, for example, by purpose, + // owner, or environment. Each tag consists of a key and an optional value, both of + // which you define. Tags []types.Tag // A location is a combination of Amazon Web Services Regions and Amazon Web diff --git a/service/ssm/types/enums.go b/service/ssm/types/enums.go index 331c9c6dfb3..b8e9e51188b 100644 --- a/service/ssm/types/enums.go +++ b/service/ssm/types/enums.go @@ -1132,6 +1132,7 @@ const ( OperatingSystemWindows OperatingSystem = "WINDOWS" OperatingSystemAmazonLinux OperatingSystem = "AMAZON_LINUX" OperatingSystemAmazonLinux2 OperatingSystem = "AMAZON_LINUX_2" + OperatingSystemAmazonLinux2022 OperatingSystem = "AMAZON_LINUX_2022" OperatingSystemUbuntu OperatingSystem = "UBUNTU" OperatingSystemRedhatEnterpriseLinux OperatingSystem = "REDHAT_ENTERPRISE_LINUX" OperatingSystemSuse OperatingSystem = "SUSE" @@ -1151,6 +1152,7 @@ func (OperatingSystem) Values() []OperatingSystem { "WINDOWS", "AMAZON_LINUX", "AMAZON_LINUX_2", + "AMAZON_LINUX_2022", "UBUNTU", "REDHAT_ENTERPRISE_LINUX", "SUSE", diff --git a/service/ssm/types/errors.go b/service/ssm/types/errors.go index 12cd37cb44b..bc038b0ba7c 100644 --- a/service/ssm/types/errors.go +++ b/service/ssm/types/errors.go @@ -374,9 +374,11 @@ func (e *DocumentLimitExceeded) ErrorCode() string { return "Documen func (e *DocumentLimitExceeded) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The document can't be shared with more Amazon Web Services user accounts. You -// can share a document with a maximum of 20 accounts. You can publicly share up to -// five documents. If you need to increase this limit, contact Amazon Web Services -// Support. +// can specify a maximum of 20 accounts per API operation to share a private +// document. By default, you can share a private document with a maximum of 1,000 +// accounts and publicly share up to five documents. If you need to increase the +// quota for privately or publicly shared Systems Manager documents, contact Amazon +// Web Services Support. type DocumentPermissionLimit struct { Message *string @@ -1531,7 +1533,7 @@ func (e *InvalidSchedule) ErrorMessage() string { func (e *InvalidSchedule) ErrorCode() string { return "InvalidSchedule" } func (e *InvalidSchedule) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// The tag key or value isn't valid. +// The specified tag key or value isn't valid. type InvalidTag struct { Message *string diff --git a/service/ssm/types/types.go b/service/ssm/types/types.go index c06928a892d..8fe1c41321a 100644 --- a/service/ssm/types/types.go +++ b/service/ssm/types/types.go @@ -2380,12 +2380,28 @@ type InstanceInformationFilter struct { // The filters to describe or get information about your managed nodes. type InstanceInformationStringFilter struct { - // The filter key name to describe your managed nodes. For example: "InstanceIds" | - // "AgentVersion" | "PingStatus" | "PlatformTypes" | "ActivationIds" | "IamRole" | - // "ResourceType" | "AssociationStatus" | "tag-key" | "tag:{keyname}Tag Key isn't a - // valid filter. You must specify either tag-key or tag:{keyname} and a string. - // Here are some valid examples: tag-key, tag:123, tag:al!, tag:Windows. Here are - // some invalid examples: tag-keys, Tag Key, tag:, tagKey, abc:keyname. + // The filter key name to describe your managed nodes. Valid filter key values: + // ActivationIds | AgentVersion | AssociationStatus | IamRole | InstanceIds | + // PingStatus | PlatformTypes | ResourceType | SourceIds | SourceTypes | "tag-key" + // | "tag:{keyname} + // + // * Valid values for the AssociationStatus filter key: Success | + // Pending | Failed + // + // * Valid values for the PingStatus filter key: Online | + // ConnectionLost | Inactive (deprecated) + // + // * Valid values for the PlatformType + // filter key: Windows | Linux | MacOS + // + // * Valid values for the ResourceType filter + // key: EC2Instance | ManagedInstance + // + // * Valid values for the SourceType filter + // key: AWS::EC2::Instance | AWS::SSM::ManagedInstance | AWS::IoT::Thing + // + // * Valid + // tag examples: Key=tag-key,Values=Purpose | Key=tag:Purpose,Values=Test. // // This member is required. Key *string @@ -2440,10 +2456,10 @@ type InstancePatchState struct { // This member is required. PatchGroup *string - // The number of managed nodes where patches that are specified as Critical for - // compliance reporting in the patch baseline aren't installed. These patches might - // be missing, have failed installation, were rejected, or were installed but - // awaiting a required managed node reboot. The status of these managed nodes is + // The number of patches per node that are specified as Critical for compliance + // reporting in the patch baseline aren't installed. These patches might be + // missing, have failed installation, were rejected, or were installed but awaiting + // a required managed node reboot. The status of these managed nodes is // NON_COMPLIANT. CriticalNonCompliantCount *int32 @@ -2494,9 +2510,9 @@ type InstancePatchState struct { // this limit are reported in UnreportedNotApplicableCount. NotApplicableCount int32 - // The number of managed nodes with patches installed that are specified as other - // than Critical or Security but aren't compliant with the patch baseline. The - // status of these managed nodes is NON_COMPLIANT. + // The number of patches per node that are specified as other than Critical or + // Security but aren't compliant with the patch baseline. The status of these + // managed nodes is NON_COMPLIANT. OtherNonCompliantCount *int32 // Placeholder information. This field will always be empty in the current release @@ -2517,8 +2533,8 @@ type InstancePatchState struct { // not be in effect until a reboot is performed. RebootOption RebootOption - // The number of managed nodes where patches that are specified as Security in a - // patch advisory aren't installed. These patches might be missing, have failed + // The number of patches per node that are specified as Security in a patch + // advisory aren't installed. These patches might be missing, have failed // installation, were rejected, or were installed but awaiting a required managed // node reboot. The status of these managed nodes is NON_COMPLIANT. SecurityNonCompliantCount *int32 @@ -2844,7 +2860,7 @@ type InventoryResultItem struct { // window task types, see MaintenanceWindowTaskInvocationParameters. type LoggingInfo struct { - // The name of an S3 bucket where execution logs are stored . + // The name of an S3 bucket where execution logs are stored. // // This member is required. S3BucketName *string diff --git a/service/ssmincidents/types/enums.go b/service/ssmincidents/types/enums.go index eaa0f1cf182..36ec2740688 100644 --- a/service/ssmincidents/types/enums.go +++ b/service/ssmincidents/types/enums.go @@ -32,6 +32,7 @@ const ( ItemTypeOther ItemType = "OTHER" ItemTypeAutomation ItemType = "AUTOMATION" ItemTypeInvolvedResource ItemType = "INVOLVED_RESOURCE" + ItemTypeTask ItemType = "TASK" ) // Values returns all known values for ItemType. Note that this can be expanded in @@ -47,6 +48,7 @@ func (ItemType) Values() []ItemType { "OTHER", "AUTOMATION", "INVOLVED_RESOURCE", + "TASK", } } diff --git a/service/transfer/api_op_CreateAccess.go b/service/transfer/api_op_CreateAccess.go index 71d38acb22f..5504df61c25 100644 --- a/service/transfer/api_op_CreateAccess.go +++ b/service/transfer/api_op_CreateAccess.go @@ -121,13 +121,13 @@ type CreateAccessInput struct { type CreateAccessOutput struct { - // The external ID of the group whose users have access to your Amazon S3 or Amazon - // EFS resources over the enabled protocols using Transfer Family. + // The external identifier of the group whose users have access to your Amazon S3 + // or Amazon EFS resources over the enabled protocols using Transfer Family. // // This member is required. ExternalId *string - // The ID of the server that the user is attached to. + // The identifier of the server that the user is attached to. // // This member is required. ServerId *string diff --git a/service/transfer/api_op_CreateAgreement.go b/service/transfer/api_op_CreateAgreement.go index c3c33154f3d..63d9ef524c6 100644 --- a/service/transfer/api_op_CreateAgreement.go +++ b/service/transfer/api_op_CreateAgreement.go @@ -50,7 +50,7 @@ type CreateAgreementInput struct { AccessRole *string // The landing directory (folder) for files transferred by using the AS2 protocol. - // A BaseDirectory example is /DOC-EXAMPLE-BUCKET/home/mydirectory . + // A BaseDirectory example is DOC-EXAMPLE-BUCKET/home/mydirectory. // // This member is required. BaseDirectory *string diff --git a/service/transfer/api_op_CreateConnector.go b/service/transfer/api_op_CreateConnector.go index d94445fb280..3694611a43e 100644 --- a/service/transfer/api_op_CreateConnector.go +++ b/service/transfer/api_op_CreateConnector.go @@ -12,8 +12,10 @@ import ( ) // Creates the connector, which captures the parameters for an outbound connection -// for the AS2 protocol. The connector is required for sending files from a -// customer's non Amazon Web Services server. +// for the AS2 protocol. The connector is required for sending files to an +// externally hosted AS2 server. For more details about connectors, see Create AS2 +// connectors +// (https://docs.aws.amazon.com/transfer/latest/userguide/create-b2b-server.html#configure-as2-connector). func (c *Client) CreateConnector(ctx context.Context, params *CreateConnectorInput, optFns ...func(*Options)) (*CreateConnectorOutput, error) { if params == nil { params = &CreateConnectorInput{} diff --git a/service/transfer/api_op_CreateProfile.go b/service/transfer/api_op_CreateProfile.go index d869f036898..4c111b43e43 100644 --- a/service/transfer/api_op_CreateProfile.go +++ b/service/transfer/api_op_CreateProfile.go @@ -11,8 +11,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Creates the profile for the AS2 process. The agreement is between the partner -// and the AS2 process. +// Creates the local or partner profile to use for AS2 transfers. func (c *Client) CreateProfile(ctx context.Context, params *CreateProfileInput, optFns ...func(*Options)) (*CreateProfileOutput, error) { if params == nil { params = &CreateProfileInput{} @@ -39,9 +38,14 @@ type CreateProfileInput struct { // This member is required. As2Id *string - // Indicates whether to list only LOCAL type profiles or only PARTNER type - // profiles. If not supplied in the request, the command lists all types of - // profiles. + // Determines the type of profile to create: + // + // * Specify LOCAL to create a local + // profile. A local profile represents the AS2-enabled Transfer Family server + // organization or party. + // + // * Specify PARTNER to create a partner profile. A partner + // profile represents a remote organization, external to Transfer Family. // // This member is required. ProfileType types.ProfileType diff --git a/service/transfer/api_op_CreateServer.go b/service/transfer/api_op_CreateServer.go index c0492288963..db5500f5807 100644 --- a/service/transfer/api_op_CreateServer.go +++ b/service/transfer/api_op_CreateServer.go @@ -94,19 +94,21 @@ type CreateServerInput struct { // EndpointType set to VPC_ENDPOINT. EndpointType types.EndpointType - // The RSA, ECDSA, or ED25519 private key to use for your server. Use the following - // command to generate an RSA 2048 bit key with no passphrase: ssh-keygen -t rsa -b - // 2048 -N "" -m PEM -f my-new-server-key. Use a minimum value of 2048 for the -b - // option. You can create a stronger key by using 3072 or 4096. Use the following - // command to generate an ECDSA 256 bit key with no passphrase: ssh-keygen -t ecdsa - // -b 256 -N "" -m PEM -f my-new-server-key. Valid values for the -b option for - // ECDSA are 256, 384, and 521. Use the following command to generate an ED25519 - // key with no passphrase: ssh-keygen -t ed25519 -N "" -f my-new-server-key. For - // all of these commands, you can replace my-new-server-key with a string of your - // choice. If you aren't planning to migrate existing users from an existing - // SFTP-enabled server to a new server, don't update the host key. Accidentally - // changing a server's host key can be disruptive. For more information, see Change - // the host key for your SFTP-enabled server + // The RSA, ECDSA, or ED25519 private key to use for your SFTP-enabled server. You + // can add multiple host keys, in case you want to rotate keys, or have a set of + // active keys that use different algorithms. Use the following command to generate + // an RSA 2048 bit key with no passphrase: ssh-keygen -t rsa -b 2048 -N "" -m PEM + // -f my-new-server-key. Use a minimum value of 2048 for the -b option. You can + // create a stronger key by using 3072 or 4096. Use the following command to + // generate an ECDSA 256 bit key with no passphrase: ssh-keygen -t ecdsa -b 256 -N + // "" -m PEM -f my-new-server-key. Valid values for the -b option for ECDSA are + // 256, 384, and 521. Use the following command to generate an ED25519 key with no + // passphrase: ssh-keygen -t ed25519 -N "" -f my-new-server-key. For all of these + // commands, you can replace my-new-server-key with a string of your choice. If you + // aren't planning to migrate existing users from an existing SFTP-enabled server + // to a new server, don't update the host key. Accidentally changing a server's + // host key can be disruptive. For more information, see Update host keys for your + // SFTP-enabled server // (https://docs.aws.amazon.com/transfer/latest/userguide/edit-server-config.html#configuring-servers-change-host-key) // in the Transfer Family User Guide. HostKey *string @@ -217,7 +219,10 @@ type CreateServerInput struct { Tags []types.Tag // Specifies the workflow ID for the workflow to assign and the execution role - // that's used for executing the workflow. + // that's used for executing the workflow. In additon to a workflow to execute when + // a file is uploaded completely, WorkflowDeatails can also contain a workflow ID + // (and execution role) for a workflow to execute on partial upload. A partial + // upload occurs when a file is open when the session disconnects. WorkflowDetails *types.WorkflowDetails noSmithyDocumentSerde @@ -225,7 +230,7 @@ type CreateServerInput struct { type CreateServerOutput struct { - // The service-assigned ID of the server that is created. + // The service-assigned identifier of the server that is created. // // This member is required. ServerId *string diff --git a/service/transfer/api_op_CreateUser.go b/service/transfer/api_op_CreateUser.go index 51b56151206..971973ac46d 100644 --- a/service/transfer/api_op_CreateUser.go +++ b/service/transfer/api_op_CreateUser.go @@ -123,7 +123,7 @@ type CreateUserInput struct { type CreateUserOutput struct { - // The ID of the server that the user is attached to. + // The identifier of the server that the user is attached to. // // This member is required. ServerId *string diff --git a/service/transfer/api_op_DeleteAgreement.go b/service/transfer/api_op_DeleteAgreement.go index c8266509cc0..f18f24ac144 100644 --- a/service/transfer/api_op_DeleteAgreement.go +++ b/service/transfer/api_op_DeleteAgreement.go @@ -34,7 +34,7 @@ type DeleteAgreementInput struct { // This member is required. AgreementId *string - // The server ID associated with the agreement that you are deleting. + // The server identifier associated with the agreement that you are deleting. // // This member is required. ServerId *string diff --git a/service/transfer/api_op_DeleteCertificate.go b/service/transfer/api_op_DeleteCertificate.go index f1aab6fc994..9221d4d3df3 100644 --- a/service/transfer/api_op_DeleteCertificate.go +++ b/service/transfer/api_op_DeleteCertificate.go @@ -28,7 +28,7 @@ func (c *Client) DeleteCertificate(ctx context.Context, params *DeleteCertificat type DeleteCertificateInput struct { - // The ID of the certificate object that you are deleting. + // The identifier of the certificate object that you are deleting. // // This member is required. CertificateId *string diff --git a/service/transfer/api_op_DeleteHostKey.go b/service/transfer/api_op_DeleteHostKey.go index daee9456457..45e33ce35be 100644 --- a/service/transfer/api_op_DeleteHostKey.go +++ b/service/transfer/api_op_DeleteHostKey.go @@ -28,12 +28,12 @@ func (c *Client) DeleteHostKey(ctx context.Context, params *DeleteHostKeyInput, type DeleteHostKeyInput struct { - // The ID of the host key that you are deleting. + // The identifier of the host key that you are deleting. // // This member is required. HostKeyId *string - // Provide the ID of the server that contains the host key that you are deleting. + // The identifier of the server that contains the host key that you are deleting. // // This member is required. ServerId *string diff --git a/service/transfer/api_op_DeleteProfile.go b/service/transfer/api_op_DeleteProfile.go index f2f137fe52d..e231b7c2fc9 100644 --- a/service/transfer/api_op_DeleteProfile.go +++ b/service/transfer/api_op_DeleteProfile.go @@ -28,7 +28,7 @@ func (c *Client) DeleteProfile(ctx context.Context, params *DeleteProfileInput, type DeleteProfileInput struct { - // The ID of the profile that you are deleting. + // The identifier of the profile that you are deleting. // // This member is required. ProfileId *string diff --git a/service/transfer/api_op_DescribeAccess.go b/service/transfer/api_op_DescribeAccess.go index 1d5baa370e6..70ff0c1d80e 100644 --- a/service/transfer/api_op_DescribeAccess.go +++ b/service/transfer/api_op_DescribeAccess.go @@ -56,7 +56,7 @@ type DescribeAccessInput struct { type DescribeAccessOutput struct { - // The external ID of the server that the access is attached to. + // The external identifier of the server that the access is attached to. // // This member is required. Access *types.DescribedAccess diff --git a/service/transfer/api_op_DescribeAgreement.go b/service/transfer/api_op_DescribeAgreement.go index d9e6f7825e1..03f30c35083 100644 --- a/service/transfer/api_op_DescribeAgreement.go +++ b/service/transfer/api_op_DescribeAgreement.go @@ -35,7 +35,7 @@ type DescribeAgreementInput struct { // This member is required. AgreementId *string - // The server ID that's associated with the agreement. + // The server identifier that's associated with the agreement. // // This member is required. ServerId *string diff --git a/service/transfer/api_op_DescribeHostKey.go b/service/transfer/api_op_DescribeHostKey.go index 82bc0c40644..b0cbdd3b8cb 100644 --- a/service/transfer/api_op_DescribeHostKey.go +++ b/service/transfer/api_op_DescribeHostKey.go @@ -30,12 +30,12 @@ func (c *Client) DescribeHostKey(ctx context.Context, params *DescribeHostKeyInp type DescribeHostKeyInput struct { - // Provide the ID of the host key that you want described. + // The identifier of the host key that you want described. // // This member is required. HostKeyId *string - // Provide the ID of the server that contains the host key that you want described. + // The identifier of the server that contains the host key that you want described. // // This member is required. ServerId *string diff --git a/service/transfer/api_op_ImportHostKey.go b/service/transfer/api_op_ImportHostKey.go index 594650278a6..7a0b87aa596 100644 --- a/service/transfer/api_op_ImportHostKey.go +++ b/service/transfer/api_op_ImportHostKey.go @@ -11,7 +11,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Adds a host key to the server specified by the ServerId parameter. +// Adds a host key to the server that's specified by the ServerId parameter. func (c *Client) ImportHostKey(ctx context.Context, params *ImportHostKeyInput, optFns ...func(*Options)) (*ImportHostKeyOutput, error) { if params == nil { params = &ImportHostKeyInput{} @@ -35,12 +35,12 @@ type ImportHostKeyInput struct { // This member is required. HostKeyBody *string - // Provide the ID of the server that contains the host key that you are importing. + // The identifier of the server that contains the host key that you are importing. // // This member is required. ServerId *string - // Enter a text description to identify this host key. + // The text description that identifies this host key. Description *string // Key-value pairs that can be used to group and search for host keys. @@ -51,12 +51,12 @@ type ImportHostKeyInput struct { type ImportHostKeyOutput struct { - // Returns the host key ID for the imported key. + // Returns the host key identifier for the imported key. // // This member is required. HostKeyId *string - // Returns the server ID that contains the imported key. + // Returns the server identifier that contains the imported key. // // This member is required. ServerId *string diff --git a/service/transfer/api_op_ListHostKeys.go b/service/transfer/api_op_ListHostKeys.go index 430f5361933..eb32f17b85d 100644 --- a/service/transfer/api_op_ListHostKeys.go +++ b/service/transfer/api_op_ListHostKeys.go @@ -11,7 +11,8 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Returns a list of host keys for the server specified by the ServerId paramter. +// Returns a list of host keys for the server that's specified by the ServerId +// parameter. func (c *Client) ListHostKeys(ctx context.Context, params *ListHostKeysInput, optFns ...func(*Options)) (*ListHostKeysOutput, error) { if params == nil { params = &ListHostKeysInput{} @@ -29,7 +30,7 @@ func (c *Client) ListHostKeys(ctx context.Context, params *ListHostKeysInput, op type ListHostKeysInput struct { - // Provide the ID of the server that contains the host keys that you want to view. + // The identifier of the server that contains the host keys that you want to view. // // This member is required. ServerId *string @@ -52,7 +53,7 @@ type ListHostKeysOutput struct { // This member is required. HostKeys []types.ListedHostKey - // Returns the server ID that contains the listed host keys. + // Returns the server identifier that contains the listed host keys. // // This member is required. ServerId *string diff --git a/service/transfer/api_op_StartFileTransfer.go b/service/transfer/api_op_StartFileTransfer.go index b3a97d6b775..37207f41ebb 100644 --- a/service/transfer/api_op_StartFileTransfer.go +++ b/service/transfer/api_op_StartFileTransfer.go @@ -10,8 +10,8 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Begins an outbound file transfer. You specify the ConnectorId and the file paths -// for where to send the files. +// Begins an outbound file transfer to a remote AS2 server. You specify the +// ConnectorId and the file paths for where to send the files. func (c *Client) StartFileTransfer(ctx context.Context, params *StartFileTransferInput, optFns ...func(*Options)) (*StartFileTransferOutput, error) { if params == nil { params = &StartFileTransferInput{} diff --git a/service/transfer/api_op_UpdateAccess.go b/service/transfer/api_op_UpdateAccess.go index 0cee7bdc424..a21733b37ed 100644 --- a/service/transfer/api_op_UpdateAccess.go +++ b/service/transfer/api_op_UpdateAccess.go @@ -113,14 +113,14 @@ type UpdateAccessInput struct { type UpdateAccessOutput struct { - // The external ID of the group whose users have access to your Amazon S3 or Amazon - // EFS resources over the enabled protocols using Amazon Web ServicesTransfer - // Family. + // The external identifier of the group whose users have access to your Amazon S3 + // or Amazon EFS resources over the enabled protocols using Amazon Web + // ServicesTransfer Family. // // This member is required. ExternalId *string - // The ID of the server that the user is attached to. + // The identifier of the server that the user is attached to. // // This member is required. ServerId *string diff --git a/service/transfer/api_op_UpdateHostKey.go b/service/transfer/api_op_UpdateHostKey.go index 6dc239c80a9..9dcdac67478 100644 --- a/service/transfer/api_op_UpdateHostKey.go +++ b/service/transfer/api_op_UpdateHostKey.go @@ -10,8 +10,8 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Updates the description for the host key specified by the specified by the -// ServerId and HostKeyId parameters. +// Updates the description for the host key that's specified by the ServerId and +// HostKeyId parameters. func (c *Client) UpdateHostKey(ctx context.Context, params *UpdateHostKeyInput, optFns ...func(*Options)) (*UpdateHostKeyOutput, error) { if params == nil { params = &UpdateHostKeyInput{} @@ -29,17 +29,17 @@ func (c *Client) UpdateHostKey(ctx context.Context, params *UpdateHostKeyInput, type UpdateHostKeyInput struct { - // Provide an updated description for the host key. + // An updated description for the host key. // // This member is required. Description *string - // Provide the ID of the host key that you are updating. + // The identifier of the host key that you are updating. // // This member is required. HostKeyId *string - // Provide the ID of the server that contains the host key that you are updating. + // The identifier of the server that contains the host key that you are updating. // // This member is required. ServerId *string @@ -49,12 +49,12 @@ type UpdateHostKeyInput struct { type UpdateHostKeyOutput struct { - // Returns the host key ID for the updated host key. + // Returns the host key identifier for the updated host key. // // This member is required. HostKeyId *string - // Returns the server ID for the server that contains the updated host key. + // Returns the server identifier for the server that contains the updated host key. // // This member is required. ServerId *string diff --git a/service/transfer/api_op_UpdateServer.go b/service/transfer/api_op_UpdateServer.go index fdbd0c74fe0..ca5516c43ad 100644 --- a/service/transfer/api_op_UpdateServer.go +++ b/service/transfer/api_op_UpdateServer.go @@ -94,19 +94,21 @@ type UpdateServerInput struct { // EndpointType set to VPC_ENDPOINT. EndpointType types.EndpointType - // The RSA, ECDSA, or ED25519 private key to use for your server. Use the following - // command to generate an RSA 2048 bit key with no passphrase: ssh-keygen -t rsa -b - // 2048 -N "" -m PEM -f my-new-server-key. Use a minimum value of 2048 for the -b - // option. You can create a stronger key by using 3072 or 4096. Use the following - // command to generate an ECDSA 256 bit key with no passphrase: ssh-keygen -t ecdsa - // -b 256 -N "" -m PEM -f my-new-server-key. Valid values for the -b option for - // ECDSA are 256, 384, and 521. Use the following command to generate an ED25519 - // key with no passphrase: ssh-keygen -t ed25519 -N "" -f my-new-server-key. For - // all of these commands, you can replace my-new-server-key with a string of your - // choice. If you aren't planning to migrate existing users from an existing - // SFTP-enabled server to a new server, don't update the host key. Accidentally - // changing a server's host key can be disruptive. For more information, see Change - // the host key for your SFTP-enabled server + // The RSA, ECDSA, or ED25519 private key to use for your SFTP-enabled server. You + // can add multiple host keys, in case you want to rotate keys, or have a set of + // active keys that use different algorithms. Use the following command to generate + // an RSA 2048 bit key with no passphrase: ssh-keygen -t rsa -b 2048 -N "" -m PEM + // -f my-new-server-key. Use a minimum value of 2048 for the -b option. You can + // create a stronger key by using 3072 or 4096. Use the following command to + // generate an ECDSA 256 bit key with no passphrase: ssh-keygen -t ecdsa -b 256 -N + // "" -m PEM -f my-new-server-key. Valid values for the -b option for ECDSA are + // 256, 384, and 521. Use the following command to generate an ED25519 key with no + // passphrase: ssh-keygen -t ed25519 -N "" -f my-new-server-key. For all of these + // commands, you can replace my-new-server-key with a string of your choice. If you + // aren't planning to migrate existing users from an existing SFTP-enabled server + // to a new server, don't update the host key. Accidentally changing a server's + // host key can be disruptive. For more information, see Update host keys for your + // SFTP-enabled server // (https://docs.aws.amazon.com/transfer/latest/userguide/edit-server-config.html#configuring-servers-change-host-key) // in the Transfer Family User Guide. HostKey *string @@ -196,10 +198,13 @@ type UpdateServerInput struct { SecurityPolicyName *string // Specifies the workflow ID for the workflow to assign and the execution role - // that's used for executing the workflow. To remove an associated workflow from a - // server, you can provide an empty OnUpload object, as in the following example. - // aws transfer update-server --server-id s-01234567890abcdef --workflow-details - // '{"OnUpload":[]}' + // that's used for executing the workflow. In additon to a workflow to execute when + // a file is uploaded completely, WorkflowDeatails can also contain a workflow ID + // (and execution role) for a workflow to execute on partial upload. A partial + // upload occurs when a file is open when the session disconnects. To remove an + // associated workflow from a server, you can provide an empty OnUpload object, as + // in the following example. aws transfer update-server --server-id + // s-01234567890abcdef --workflow-details '{"OnUpload":[]}' WorkflowDetails *types.WorkflowDetails noSmithyDocumentSerde diff --git a/service/transfer/deserializers.go b/service/transfer/deserializers.go index 8eb5537558e..f681b023238 100644 --- a/service/transfer/deserializers.go +++ b/service/transfer/deserializers.go @@ -10574,6 +10574,40 @@ func awsAwsjson11_deserializeDocumentLoggingConfiguration(v **types.LoggingConfi return nil } +func awsAwsjson11_deserializeDocumentOnPartialUploadWorkflowDetails(v *[]types.WorkflowDetail, 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.WorkflowDetail + if *v == nil { + cv = []types.WorkflowDetail{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.WorkflowDetail + destAddr := &col + if err := awsAwsjson11_deserializeDocumentWorkflowDetail(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsAwsjson11_deserializeDocumentOnUploadWorkflowDetails(v *[]types.WorkflowDetail, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -11749,6 +11783,11 @@ func awsAwsjson11_deserializeDocumentWorkflowDetails(v **types.WorkflowDetails, for key, value := range shape { switch key { + case "OnPartialUpload": + if err := awsAwsjson11_deserializeDocumentOnPartialUploadWorkflowDetails(&sv.OnPartialUpload, value); err != nil { + return err + } + case "OnUpload": if err := awsAwsjson11_deserializeDocumentOnUploadWorkflowDetails(&sv.OnUpload, value); err != nil { return err diff --git a/service/transfer/serializers.go b/service/transfer/serializers.go index b495cfb2e80..7bc1556def3 100644 --- a/service/transfer/serializers.go +++ b/service/transfer/serializers.go @@ -3502,6 +3502,19 @@ func awsAwsjson11_serializeDocumentInputFileLocation(v *types.InputFileLocation, return nil } +func awsAwsjson11_serializeDocumentOnPartialUploadWorkflowDetails(v []types.WorkflowDetail, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentWorkflowDetail(&v[i], av); err != nil { + return err + } + } + return nil +} + func awsAwsjson11_serializeDocumentOnUploadWorkflowDetails(v []types.WorkflowDetail, value smithyjson.Value) error { array := value.Array() defer array.Close() @@ -3745,6 +3758,13 @@ func awsAwsjson11_serializeDocumentWorkflowDetails(v *types.WorkflowDetails, val object := value.Object() defer object.Close() + if v.OnPartialUpload != nil { + ok := object.Key("OnPartialUpload") + if err := awsAwsjson11_serializeDocumentOnPartialUploadWorkflowDetails(v.OnPartialUpload, ok); err != nil { + return err + } + } + if v.OnUpload != nil { ok := object.Key("OnUpload") if err := awsAwsjson11_serializeDocumentOnUploadWorkflowDetails(v.OnUpload, ok); err != nil { diff --git a/service/transfer/types/types.go b/service/transfer/types/types.go index 0975ad58664..be146cb06a3 100644 --- a/service/transfer/types/types.go +++ b/service/transfer/types/types.go @@ -400,17 +400,17 @@ type DescribedHostKey struct { // Key-value pairs that can be used to group and search for host keys. Tags []Tag - // The encryption algorithm used for the host key. The Type is one of the following - // values: + // The encryption algorithm that is used for the host key. The Type parameter is + // specified by using one of the following values: // // * ssh-rsa // // * ssh-ed25519 // - // * ecdsa-sha2-nistp256 - // // * - // ecdsa-sha2-nistp384 + // ecdsa-sha2-nistp256 + // + // * ecdsa-sha2-nistp384 // // * ecdsa-sha2-nistp521 Type *string @@ -418,7 +418,7 @@ type DescribedHostKey struct { noSmithyDocumentSerde } -// The details for a local or partner AS2 profile. profile. +// The details for a local or partner AS2 profile. type DescribedProfile struct { // The unique Amazon Resource Name (ARN) for the profile. @@ -638,7 +638,10 @@ type DescribedServer struct { UserCount *int32 // Specifies the workflow ID for the workflow to assign and the execution role - // that's used for executing the workflow. + // that's used for executing the workflow. In additon to a workflow to execute when + // a file is uploaded completely, WorkflowDeatails can also contain a workflow ID + // (and execution role) for a workflow to execute on partial upload. A partial + // upload occurs when a file is open when the session disconnects. WorkflowDetails *WorkflowDetails noSmithyDocumentSerde @@ -748,7 +751,7 @@ type DescribedWorkflow struct { // Reserved for future use. type EfsFileLocation struct { - // The ID of the file system, assigned by Amazon EFS. + // The identifier of the file system, assigned by Amazon EFS. FileSystemId *string // The pathname for the folder being used by a workflow. @@ -790,13 +793,13 @@ type EndpointDetails struct { // This property can only be set when EndpointType is set to VPC. SubnetIds []string - // The ID of the VPC endpoint. This property can only be set when EndpointType is - // set to VPC_ENDPOINT. For more information, see + // The identifier of the VPC endpoint. This property can only be set when + // EndpointType is set to VPC_ENDPOINT. For more information, see // https://docs.aws.amazon.com/transfer/latest/userguide/create-server-in-vpc.html#deprecate-vpc-endpoint. VpcEndpointId *string - // The VPC ID of the VPC in which a server's endpoint will be hosted. This property - // can only be set when EndpointType is set to VPC. + // The VPC identifier of the VPC in which a server's endpoint will be hosted. This + // property can only be set when EndpointType is set to VPC. VpcId *string noSmithyDocumentSerde @@ -892,7 +895,7 @@ type ExecutionStepResult struct { // Specifies the Amazon S3 or EFS file details to be used in the step. type FileLocation struct { - // Specifies the Amazon EFS ID and the path for the file being used. + // Specifies the Amazon EFS identifier and the path for the file being used. EfsFileLocation *EfsFileLocation // Specifies the S3 details for the file being used, such as bucket, ETag, and so @@ -1092,10 +1095,10 @@ type ListedExecution struct { noSmithyDocumentSerde } -// Returns properties of the host key that is specified. +// Returns properties of the host key that's specified. type ListedHostKey struct { - // Specifies the unique Amazon Resource Name (ARN) of the host key. + // The unique Amazon Resource Name (ARN) of the host key. // // This member is required. Arn *string @@ -1111,20 +1114,20 @@ type ListedHostKey struct { // the longer public key. Fingerprint *string - // + // A unique identifier for the host key. HostKeyId *string - // The encryption algorithm used for the host key. The Type is one of the following - // values: + // The encryption algorithm that is used for the host key. The Type parameter is + // specified by using one of the following values: // // * ssh-rsa // // * ssh-ed25519 // - // * ecdsa-sha2-nistp256 - // // * - // ecdsa-sha2-nistp384 + // ecdsa-sha2-nistp256 + // + // * ecdsa-sha2-nistp384 // // * ecdsa-sha2-nistp521 Type *string @@ -1256,8 +1259,8 @@ type ListedUser struct { noSmithyDocumentSerde } -// Contains the ID, text description, and Amazon Resource Name (ARN) for the -// workflow. +// Contains the identifier, text description, and Amazon Resource Name (ARN) for +// the workflow. type ListedWorkflow struct { // Specifies the unique Amazon Resource Name (ARN) for the workflow. @@ -1319,13 +1322,26 @@ type ProtocolDetails struct { // Indicates passive mode, for FTP and FTPS protocols. Enter a single IPv4 address, // such as the public IP address of a firewall, router, or load balancer. For - // example: aws transfer update-server --protocol-details PassiveIp=0.0.0.0 - // Replace 0.0.0.0 in the example above with the actual IP address you want to - // use. If you change the PassiveIp value, you must stop and then restart your - // Transfer Family server for the change to take effect. For details on using - // passive mode (PASV) in a NAT environment, see Configuring your FTPS server - // behind a firewall or NAT with Transfer Family + // example: aws transfer update-server --protocol-details PassiveIp=0.0.0.0 Replace + // 0.0.0.0 in the example above with the actual IP address you want to use. If you + // change the PassiveIp value, you must stop and then restart your Transfer Family + // server for the change to take effect. For details on using passive mode (PASV) + // in a NAT environment, see Configuring your FTPS server behind a firewall or NAT + // with Transfer Family // (http://aws.amazon.com/blogs/storage/configuring-your-ftps-server-behind-a-firewall-or-nat-with-aws-transfer-family/). + // Special values The AUTO and 0.0.0.0 are special values for the PassiveIp + // parameter. The value PassiveIp=AUTO is assigned by default to FTP and FTPS type + // servers. In this case, the server automatically responds with one of the + // endpoint IPs within the PASV response. PassiveIp=0.0.0.0 has a more unique + // application for its usage. For example, if you have a High Availability (HA) + // Network Load Balancer (NLB) environment, where you have 3 subnets, you can only + // specify a single IP address using the PassiveIp parameter. This reduces the + // effectiveness of having High Availability. In this case, you can specify + // PassiveIp=0.0.0.0. This tells the client to use the same IP address as the + // Control connection and utilize all AZs for their connections. Note, however, + // that not all FTP clients support the PassiveIp=0.0.0.0 response. FileZilla and + // WinSCP do support it. If you are using other clients, check to see if your + // client supports the PassiveIp=0.0.0.0 response. PassiveIp *string // Use the SetStatOption to ignore the error that is generated when the client @@ -1541,7 +1557,10 @@ type UserDetails struct { } // Specifies the workflow ID for the workflow to assign and the execution role -// that's used for executing the workflow. +// that's used for executing the workflow. In additon to a workflow to execute when +// a file is uploaded completely, WorkflowDeatails can also contain a workflow ID +// (and execution role) for a workflow to execute on partial upload. A partial +// upload occurs when a file is open when the session disconnects. type WorkflowDetail struct { // Includes the necessary permissions for S3, EFS, and Lambda operations that @@ -1563,12 +1582,15 @@ type WorkflowDetail struct { // workflow to begin execution. type WorkflowDetails struct { + // A trigger that starts a workflow if a file is only partially uploaded. You can + // attach a workflow to a server that executes whenever there is a partial upload. + // A partial upload occurs when a file is open when the session disconnects. + OnPartialUpload []WorkflowDetail + // A trigger that starts a workflow: the workflow begins to execute after a file is // uploaded. To remove an associated workflow from a server, you can provide an // empty OnUpload object, as in the following example. aws transfer update-server // --server-id s-01234567890abcdef --workflow-details '{"OnUpload":[]}' - // - // This member is required. OnUpload []WorkflowDetail noSmithyDocumentSerde diff --git a/service/transfer/validators.go b/service/transfer/validators.go index 6fc1c0ed9b2..ce7cb992fbd 100644 --- a/service/transfer/validators.go +++ b/service/transfer/validators.go @@ -1293,6 +1293,23 @@ func validateHomeDirectoryMappings(v []types.HomeDirectoryMapEntry) error { } } +func validateOnPartialUploadWorkflowDetails(v []types.WorkflowDetail) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "OnPartialUploadWorkflowDetails"} + for i := range v { + if err := validateWorkflowDetail(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOnUploadWorkflowDetails(v []types.WorkflowDetail) error { if v == nil { return nil @@ -1438,13 +1455,16 @@ func validateWorkflowDetails(v *types.WorkflowDetails) error { return nil } invalidParams := smithy.InvalidParamsError{Context: "WorkflowDetails"} - if v.OnUpload == nil { - invalidParams.Add(smithy.NewErrParamRequired("OnUpload")) - } else if v.OnUpload != nil { + if v.OnUpload != nil { if err := validateOnUploadWorkflowDetails(v.OnUpload); err != nil { invalidParams.AddNested("OnUpload", err.(smithy.InvalidParamsError)) } } + if v.OnPartialUpload != nil { + if err := validateOnPartialUploadWorkflowDetails(v.OnPartialUpload); err != nil { + invalidParams.AddNested("OnPartialUpload", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { diff --git a/service/translate/api_op_CreateParallelData.go b/service/translate/api_op_CreateParallelData.go index 8bb52e95eb7..e9572cdfacb 100644 --- a/service/translate/api_op_CreateParallelData.go +++ b/service/translate/api_op_CreateParallelData.go @@ -56,6 +56,10 @@ type CreateParallelDataInput struct { // The encryption key used to encrypt this object. EncryptionKey *types.EncryptionKey + // Tags to be associated with this resource. A tag is a key-value pair that adds + // metadata to a resource. Each tag key for the resource must be unique. For more + // information, see Tagging your resources + // (https://docs.aws.amazon.com/translate/latest/dg/tagging.html). Tags []types.Tag noSmithyDocumentSerde diff --git a/service/translate/api_op_ImportTerminology.go b/service/translate/api_op_ImportTerminology.go index 22f581f7a39..03f04ad89b6 100644 --- a/service/translate/api_op_ImportTerminology.go +++ b/service/translate/api_op_ImportTerminology.go @@ -59,6 +59,10 @@ type ImportTerminologyInput struct { // The encryption key for the custom terminology being imported. EncryptionKey *types.EncryptionKey + // Tags to be associated with this resource. A tag is a key-value pair that adds + // metadata to a resource. Each tag key for the resource must be unique. For more + // information, see Tagging your resources + // (https://docs.aws.amazon.com/translate/latest/dg/tagging.html). Tags []types.Tag noSmithyDocumentSerde diff --git a/service/translate/api_op_ListTagsForResource.go b/service/translate/api_op_ListTagsForResource.go index bf14c0a2d98..baf45b0932c 100644 --- a/service/translate/api_op_ListTagsForResource.go +++ b/service/translate/api_op_ListTagsForResource.go @@ -11,6 +11,9 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) +// Lists all tags associated with a given Amazon Translate resource. For more +// information, see Tagging your resources +// (https://docs.aws.amazon.com/translate/latest/dg/tagging.html). func (c *Client) ListTagsForResource(ctx context.Context, params *ListTagsForResourceInput, optFns ...func(*Options)) (*ListTagsForResourceOutput, error) { if params == nil { params = &ListTagsForResourceInput{} @@ -28,6 +31,9 @@ func (c *Client) ListTagsForResource(ctx context.Context, params *ListTagsForRes type ListTagsForResourceInput struct { + // The Amazon Resource Name (ARN) of the given Amazon Translate resource you are + // querying. + // // This member is required. ResourceArn *string @@ -35,6 +41,11 @@ type ListTagsForResourceInput struct { } type ListTagsForResourceOutput struct { + + // Tags associated with the Amazon Translate resource being queried. A tag is a + // key-value pair that adds as a metadata to a resource used by Amazon Translate. + // For example, a tag with "Sales" as the key might be added to a resource to + // indicate its use by the sales department. Tags []types.Tag // Metadata pertaining to the operation's result. diff --git a/service/translate/api_op_StartTextTranslationJob.go b/service/translate/api_op_StartTextTranslationJob.go index 151f15363e1..627176de8bb 100644 --- a/service/translate/api_op_StartTextTranslationJob.go +++ b/service/translate/api_op_StartTextTranslationJob.go @@ -12,13 +12,17 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Starts an asynchronous batch translation job. Batch translation jobs can be used -// to translate large volumes of text across multiple documents at once. For more -// information, see async. Batch translation jobs can be described with the -// DescribeTextTranslationJob operation, listed with the ListTextTranslationJobs -// operation, and stopped with the StopTextTranslationJob operation. Amazon -// Translate does not support batch translation of multiple source languages at -// once. +// Starts an asynchronous batch translation job. Use batch translation jobs to +// translate large volumes of text across multiple documents at once. For batch +// translation, the input documents must share the same source language. You can +// specify one or more target languages. Batch translation translates each input +// document into each of the target languages. For more information, see +// Asynchronous batch processing +// (https://docs.aws.amazon.com/translate/latest/dg/async.html) Batch translation +// jobs can be described with the DescribeTextTranslationJob operation, listed with +// the ListTextTranslationJobs operation, and stopped with the +// StopTextTranslationJob operation. Amazon Translate does not support batch +// translation of multiple source languages at once. func (c *Client) StartTextTranslationJob(ctx context.Context, params *StartTextTranslationJobInput, optFns ...func(*Options)) (*StartTextTranslationJobOutput, error) { if params == nil { params = &StartTextTranslationJobInput{} @@ -44,7 +48,8 @@ type StartTextTranslationJobInput struct { // The Amazon Resource Name (ARN) of an AWS Identity Access and Management (IAM) // role that grants Amazon Translate read access to your input data. For more - // information, see identity-and-access-management. + // information, see Identity and access management + // (https://docs.aws.amazon.com/translate/latest/dg/identity-and-access-management.html). // // This member is required. DataAccessRoleArn *string @@ -61,13 +66,18 @@ type StartTextTranslationJobInput struct { OutputDataConfig *types.OutputDataConfig // The language code of the input language. For a list of language codes, see - // what-is-languages. Amazon Translate does not automatically detect a source - // language during batch translation jobs. + // Supported languages + // (https://docs.aws.amazon.com/translate/latest/dg/what-is-languages.html). Amazon + // Translate does not automatically detect a source language during batch + // translation jobs. // // This member is required. SourceLanguageCode *string - // The language code of the output language. + // The target languages of the translation job. Enter up to 10 language codes. Each + // input file is translated into each target language. Each language code is two or + // five characters long. For a list of language codes, see Supported languages + // (https://docs.aws.amazon.com/translate/latest/dg/what-is-languages.html). // // This member is required. TargetLanguageCodes []string @@ -77,25 +87,31 @@ type StartTextTranslationJobInput struct { // The name of a parallel data resource to add to the translation job. This // resource consists of examples that show how you want segments of text to be - // translated. When you add parallel data to a translation job, you create an - // Active Custom Translation job. This parameter accepts only one parallel data - // resource. Active Custom Translation jobs are priced at a higher rate than other - // jobs that don't use parallel data. For more information, see Amazon Translate - // pricing (http://aws.amazon.com/translate/pricing/). For a list of available - // parallel data resources, use the ListParallelData operation. For more - // information, see customizing-translations-parallel-data. + // translated. If you specify multiple target languages for the job, the parallel + // data file must include translations for all the target languages. When you add + // parallel data to a translation job, you create an Active Custom Translation job. + // This parameter accepts only one parallel data resource. Active Custom + // Translation jobs are priced at a higher rate than other jobs that don't use + // parallel data. For more information, see Amazon Translate pricing + // (http://aws.amazon.com/translate/pricing/). For a list of available parallel + // data resources, use the ListParallelData operation. For more information, see + // Customizing your translations with parallel data + // (https://docs.aws.amazon.com/translate/latest/dg/customizing-translations-parallel-data.html). ParallelDataNames []string - // Settings to configure your translation output, including the option to mask - // profane words and phrases. StartTextTranslationJob does not support the - // formality setting. + // Settings to configure your translation output, including the option to set the + // formality level of the output text and the option to mask profane words and + // phrases. Settings *types.TranslationSettings // The name of a custom terminology resource to add to the translation job. This // resource lists examples source terms and the desired translation for each term. - // This parameter accepts only one custom terminology resource. For a list of - // available custom terminology resources, use the ListTerminologies operation. For - // more information, see how-custom-terminology. + // This parameter accepts only one custom terminology resource. If you specify + // multiple target languages for the job, translate uses the designated terminology + // for each requested target language that has an entry for the source term in the + // terminology file. For a list of available custom terminology resources, use the + // ListTerminologies operation. For more information, see Custom terminology + // (https://docs.aws.amazon.com/translate/latest/dg/how-custom-terminology.html). TerminologyNames []string noSmithyDocumentSerde diff --git a/service/translate/api_op_TagResource.go b/service/translate/api_op_TagResource.go index bb95443ade6..e8386b5bb14 100644 --- a/service/translate/api_op_TagResource.go +++ b/service/translate/api_op_TagResource.go @@ -11,6 +11,9 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) +// Associates a specific tag with a resource. A tag is a key-value pair that adds +// as a metadata to a resource. For more information, see Tagging your resources +// (https://docs.aws.amazon.com/translate/latest/dg/tagging.html). func (c *Client) TagResource(ctx context.Context, params *TagResourceInput, optFns ...func(*Options)) (*TagResourceOutput, error) { if params == nil { params = &TagResourceInput{} @@ -28,9 +31,16 @@ func (c *Client) TagResource(ctx context.Context, params *TagResourceInput, optF type TagResourceInput struct { + // The Amazon Resource Name (ARN) of the given Amazon Translate resource to which + // you want to associate the tags. + // // This member is required. ResourceArn *string + // Tags being associated with a specific Amazon Translate resource. There can be a + // maximum of 50 tags (both existing and pending) associated with a specific + // resource. + // // This member is required. Tags []types.Tag diff --git a/service/translate/api_op_TranslateText.go b/service/translate/api_op_TranslateText.go index d5ecc0413fd..865b12a714f 100644 --- a/service/translate/api_op_TranslateText.go +++ b/service/translate/api_op_TranslateText.go @@ -12,7 +12,8 @@ import ( ) // Translates input text from the source language to the target language. For a -// list of available languages and language codes, see what-is-languages. +// list of available languages and language codes, see Supported languages +// (https://docs.aws.amazon.com/translate/latest/dg/what-is-languages.html). func (c *Client) TranslateText(ctx context.Context, params *TranslateTextInput, optFns ...func(*Options)) (*TranslateTextOutput, error) { if params == nil { params = &TranslateTextInput{} @@ -32,9 +33,11 @@ type TranslateTextInput struct { // The language code for the language of the source text. The language must be a // language supported by Amazon Translate. For a list of language codes, see - // what-is-languages. To have Amazon Translate determine the source language of - // your text, you can specify auto in the SourceLanguageCode field. If you specify - // auto, Amazon Translate will call Amazon Comprehend + // Supported languages + // (https://docs.aws.amazon.com/translate/latest/dg/what-is-languages.html). To + // have Amazon Translate determine the source language of your text, you can + // specify auto in the SourceLanguageCode field. If you specify auto, Amazon + // Translate will call Amazon Comprehend // (https://docs.aws.amazon.com/comprehend/latest/dg/comprehend-general.html) to // determine the source language. If you specify auto, you must send the // TranslateText request in a region that supports Amazon Comprehend. Otherwise, diff --git a/service/translate/api_op_UntagResource.go b/service/translate/api_op_UntagResource.go index 240328adb48..6d2a71d326a 100644 --- a/service/translate/api_op_UntagResource.go +++ b/service/translate/api_op_UntagResource.go @@ -10,6 +10,9 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) +// Removes a specific tag associated with an Amazon Translate resource. For more +// information, see Tagging your resources +// (https://docs.aws.amazon.com/translate/latest/dg/tagging.html). func (c *Client) UntagResource(ctx context.Context, params *UntagResourceInput, optFns ...func(*Options)) (*UntagResourceOutput, error) { if params == nil { params = &UntagResourceInput{} @@ -27,9 +30,16 @@ func (c *Client) UntagResource(ctx context.Context, params *UntagResourceInput, type UntagResourceInput struct { + // The Amazon Resource Name (ARN) of the given Amazon Translate resource from which + // you want to remove the tags. + // // This member is required. ResourceArn *string + // The initial part of a key-value pair that forms a tag being removed from a given + // resource. Keys must be unique and cannot be duplicated for a particular + // resource. + // // This member is required. TagKeys []string diff --git a/service/translate/doc.go b/service/translate/doc.go index 8cb1ad13269..fbb1619a68f 100644 --- a/service/translate/doc.go +++ b/service/translate/doc.go @@ -3,6 +3,6 @@ // Package translate provides the API client, operations, and parameter types for // Amazon Translate. // -// Provides translation between one source language and another of the same set of -// languages. +// Provides language translation for input text in the source language to the +// specified target language. package translate diff --git a/service/translate/types/errors.go b/service/translate/types/errors.go index 3473e8f494c..0fe5bad5350 100644 --- a/service/translate/types/errors.go +++ b/service/translate/types/errors.go @@ -257,6 +257,7 @@ func (e *TooManyRequestsException) ErrorMessage() string { func (e *TooManyRequestsException) ErrorCode() string { return "TooManyRequestsException" } func (e *TooManyRequestsException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } +// You have added too many tags to this resource. The maximum is 50 tags. type TooManyTagsException struct { Message *string @@ -303,8 +304,9 @@ func (e *UnsupportedDisplayLanguageCodeException) ErrorFault() smithy.ErrorFault } // Amazon Translate does not support translation from the language of the source -// text into the requested target language. For more information, see -// how-to-error-msg. +// text into the requested target language. For more information, see Error +// messages +// (https://docs.aws.amazon.com/translate/latest/dg/how-to-error-msg.html). type UnsupportedLanguagePairException struct { Message *string diff --git a/service/translate/types/types.go b/service/translate/types/types.go index 36477858e11..5cf5ea089b5 100644 --- a/service/translate/types/types.go +++ b/service/translate/types/types.go @@ -250,11 +250,18 @@ type ParallelDataProperties struct { noSmithyDocumentSerde } +// A key-value pair that adds as a metadata to a resource used by Amazon Translate. type Tag struct { + // The initial part of a key-value pair that forms a tag associated with a given + // resource. + // // This member is required. Key *string + // The second part of a key-value pair that forms a tag associated with a given + // resource. + // // This member is required. Value *string @@ -469,21 +476,22 @@ type TextTranslationJobProperties struct { noSmithyDocumentSerde } -// Settings that configure the translation output. +// Optional settings that configure the translation output. Use these settings for +// real time translations and asynchronous translation jobs. type TranslationSettings struct { - // You can optionally specify the desired level of formality for real-time - // translations to supported target languages. The formality setting controls the - // level of formal language usage (also known as register + // You can optionally specify the desired level of formality for translations to + // supported target languages. The formality setting controls the level of formal + // language usage (also known as register // (https://en.wikipedia.org/wiki/Register_(sociolinguistics))) in the translation // output. You can set the value to informal or formal. If you don't specify a // value for formality, or if the target language doesn't support formality, the - // translation will ignore the formality setting. Note that asynchronous - // translation jobs don't support formality. If you provide a value for formality, - // the StartTextTranslationJob API throws an exception (InvalidRequestException). - // For target languages that support formality, see Supported Languages and - // Language Codes in the Amazon Translate Developer Guide - // (https://docs.aws.amazon.com/translate/latest/dg/what-is.html). + // translation will ignore the formality setting. If you specify multiple target + // languages for the job, translate ignores the formality setting for any + // unsupported target language. For a list of target languages that support + // formality, see Setting Formality + // (https://docs.aws.amazon.com/translate/latest/dg/customizing-translations-formality.html) + // in the Amazon Translate Developer Guide. Formality Formality // Enable the profanity setting if you want Amazon Translate to mask profane words @@ -491,9 +499,13 @@ type TranslationSettings struct { // Amazon Translate replaces them with the grawlix string “?$#@$“. This 5-character // sequence is used for each profane word or phrase, regardless of the length or // number of words. Amazon Translate doesn't detect profanity in all of its - // supported languages. For languages that support profanity detection, see - // Supported Languages and Language Codes in the Amazon Translate Developer Guide - // (https://docs.aws.amazon.com/translate/latest/dg/what-is.html). + // supported languages. For languages that support profanity detection, see Masking + // profanity + // (https://docs.aws.amazon.com/translate/latest/dg/customizing-translations-profanity.html) + // in the Amazon Translate Developer Guide. If you specify multiple target + // languages for the job, all the target languages must support profanity masking. + // If any of the target languages don't support profanity masking, the translation + // job won't mask profanity for any target language. Profanity Profanity noSmithyDocumentSerde diff --git a/service/wisdom/api_op_PutFeedback.go b/service/wisdom/api_op_PutFeedback.go deleted file mode 100644 index e71abb0bd03..00000000000 --- a/service/wisdom/api_op_PutFeedback.go +++ /dev/null @@ -1,164 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package wisdom - -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/wisdom/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Submits feedback to Wisdom. The feedback is used to improve future -// recommendations from GetRecommendations -// (https://docs.aws.amazon.com/wisdom/latest/APIReference/API_GetRecommendations.html) -// or results from QueryAssistant -// (https://docs.aws.amazon.com/wisdom/latest/APIReference/API_QueryAssistant.html). -// Feedback can be resubmitted up to 6 hours after submission. -func (c *Client) PutFeedback(ctx context.Context, params *PutFeedbackInput, optFns ...func(*Options)) (*PutFeedbackOutput, error) { - if params == nil { - params = &PutFeedbackInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "PutFeedback", params, optFns, c.addOperationPutFeedbackMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*PutFeedbackOutput) - out.ResultMetadata = metadata - return out, nil -} - -type PutFeedbackInput struct { - - // The identifier of the Wisdom assistant. Can be either the ID or the ARN. URLs - // cannot contain the ARN. - // - // This member is required. - AssistantId *string - - // The feedback. - // - // This member is required. - Feedback *types.FeedbackData - - // The identifier of a recommendation. or The identifier of the result data. - // - // This member is required. - TargetId *string - - // The type of the targetId for which The feedback. is targeted. - // - // This member is required. - TargetType types.TargetType - - noSmithyDocumentSerde -} - -type PutFeedbackOutput struct { - - // The Amazon Resource Name (ARN) of the Wisdom assistant. - // - // This member is required. - AssistantArn *string - - // The identifier of the Wisdom assistant. - // - // This member is required. - AssistantId *string - - // The feedback. - // - // This member is required. - Feedback *types.FeedbackData - - // The identifier of a recommendation. or The identifier of the result data. - // - // This member is required. - TargetId *string - - // The type of the targetId for which The feedback. is targeted. - // - // This member is required. - TargetType types.TargetType - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationPutFeedbackMiddlewares(stack *middleware.Stack, options Options) (err error) { - err = stack.Serialize.Add(&awsRestjson1_serializeOpPutFeedback{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpPutFeedback{}, 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 = addOpPutFeedbackValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutFeedback(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_opPutFeedback(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - SigningName: "wisdom", - OperationName: "PutFeedback", - } -} diff --git a/service/wisdom/deserializers.go b/service/wisdom/deserializers.go index f091209e95b..f7ed8ad630d 100644 --- a/service/wisdom/deserializers.go +++ b/service/wisdom/deserializers.go @@ -3185,195 +3185,6 @@ func awsRestjson1_deserializeOpDocumentNotifyRecommendationsReceivedOutput(v **N return nil } -type awsRestjson1_deserializeOpPutFeedback struct { -} - -func (*awsRestjson1_deserializeOpPutFeedback) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpPutFeedback) 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, awsRestjson1_deserializeOpErrorPutFeedback(response, &metadata) - } - output := &PutFeedbackOutput{} - 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 = awsRestjson1_deserializeOpDocumentPutFeedbackOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorPutFeedback(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("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("ValidationException", errorCode): - return awsRestjson1_deserializeErrorValidationException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentPutFeedbackOutput(v **PutFeedbackOutput, 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 *PutFeedbackOutput - if *v == nil { - sv = &PutFeedbackOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "assistantArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected UuidOrArn to be of type string, got %T instead", value) - } - sv.AssistantArn = ptr.String(jtv) - } - - case "assistantId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Uuid to be of type string, got %T instead", value) - } - sv.AssistantId = ptr.String(jtv) - } - - case "feedback": - if err := awsRestjson1_deserializeDocumentFeedbackData(&sv.Feedback, value); err != nil { - return err - } - - case "targetId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Uuid to be of type string, got %T instead", value) - } - sv.TargetId = ptr.String(jtv) - } - - case "targetType": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected TargetType to be of type string, got %T instead", value) - } - sv.TargetType = types.TargetType(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - type awsRestjson1_deserializeOpQueryAssistant struct { } @@ -5967,46 +5778,6 @@ func awsRestjson1_deserializeDocumentDocumentText(v **types.DocumentText, value return nil } -func awsRestjson1_deserializeDocumentFeedbackData(v **types.FeedbackData, 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.FeedbackData - if *v == nil { - sv = &types.FeedbackData{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "relevance": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Relevance to be of type string, got %T instead", value) - } - sv.Relevance = types.Relevance(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - func awsRestjson1_deserializeDocumentHeaders(v *map[string]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/wisdom/generated.json b/service/wisdom/generated.json index cd8466f4771..d35d9dfd982 100644 --- a/service/wisdom/generated.json +++ b/service/wisdom/generated.json @@ -30,7 +30,6 @@ "api_op_ListKnowledgeBases.go", "api_op_ListTagsForResource.go", "api_op_NotifyRecommendationsReceived.go", - "api_op_PutFeedback.go", "api_op_QueryAssistant.go", "api_op_RemoveKnowledgeBaseTemplateUri.go", "api_op_SearchContent.go", diff --git a/service/wisdom/serializers.go b/service/wisdom/serializers.go index 6e8a55ed3a4..f61276ba157 100644 --- a/service/wisdom/serializers.go +++ b/service/wisdom/serializers.go @@ -1640,99 +1640,6 @@ func awsRestjson1_serializeOpDocumentNotifyRecommendationsReceivedInput(v *Notif return nil } -type awsRestjson1_serializeOpPutFeedback struct { -} - -func (*awsRestjson1_serializeOpPutFeedback) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpPutFeedback) 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.(*PutFeedbackInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/assistants/{assistantId}/feedback") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "PUT" - restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsPutFeedbackInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentPutFeedbackInput(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 = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsPutFeedbackInput(v *PutFeedbackInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.AssistantId == nil || len(*v.AssistantId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member assistantId must not be empty")} - } - if v.AssistantId != nil { - if err := encoder.SetURI("assistantId").String(*v.AssistantId); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeOpDocumentPutFeedbackInput(v *PutFeedbackInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.Feedback != nil { - ok := object.Key("feedback") - if err := awsRestjson1_serializeDocumentFeedbackData(v.Feedback, ok); err != nil { - return err - } - } - - if v.TargetId != nil { - ok := object.Key("targetId") - ok.String(*v.TargetId) - } - - if len(v.TargetType) > 0 { - ok := object.Key("targetType") - ok.String(string(v.TargetType)) - } - - return nil -} - type awsRestjson1_serializeOpQueryAssistant struct { } @@ -2536,18 +2443,6 @@ func awsRestjson1_serializeDocumentContentMetadata(v map[string]string, value sm return nil } -func awsRestjson1_serializeDocumentFeedbackData(v *types.FeedbackData, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if len(v.Relevance) > 0 { - ok := object.Key("relevance") - ok.String(string(v.Relevance)) - } - - return nil -} - func awsRestjson1_serializeDocumentFilter(v *types.Filter, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/wisdom/types/enums.go b/service/wisdom/types/enums.go index 972f30977c8..655dc9ac9cd 100644 --- a/service/wisdom/types/enums.go +++ b/service/wisdom/types/enums.go @@ -216,24 +216,6 @@ func (RecommendationType) Values() []RecommendationType { } } -type Relevance string - -// Enum values for Relevance -const ( - RelevanceHelpful Relevance = "HELPFUL" - RelevanceNotHelpful Relevance = "NOT_HELPFUL" -) - -// Values returns all known values for Relevance. 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 (Relevance) Values() []Relevance { - return []Relevance{ - "HELPFUL", - "NOT_HELPFUL", - } -} - type RelevanceLevel string // Enum values for RelevanceLevel @@ -253,21 +235,3 @@ func (RelevanceLevel) Values() []RelevanceLevel { "LOW", } } - -type TargetType string - -// Enum values for TargetType -const ( - TargetTypeRecommendation TargetType = "RECOMMENDATION" - TargetTypeResult TargetType = "RESULT" -) - -// Values returns all known values for TargetType. 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 (TargetType) Values() []TargetType { - return []TargetType{ - "RECOMMENDATION", - "RESULT", - } -} diff --git a/service/wisdom/types/types.go b/service/wisdom/types/types.go index 20ec1d46eb7..b33ae6cdec2 100644 --- a/service/wisdom/types/types.go +++ b/service/wisdom/types/types.go @@ -418,17 +418,6 @@ type DocumentText struct { noSmithyDocumentSerde } -// The feedback to submit to Wisdom. -type FeedbackData struct { - - // The relevance of the target this feedback is for. - // - // This member is required. - Relevance Relevance - - noSmithyDocumentSerde -} - // A search filter. type Filter struct { diff --git a/service/wisdom/validators.go b/service/wisdom/validators.go index a95d818fbdb..d8722da2d1c 100644 --- a/service/wisdom/validators.go +++ b/service/wisdom/validators.go @@ -410,26 +410,6 @@ func (m *validateOpNotifyRecommendationsReceived) HandleInitialize(ctx context.C return next.HandleInitialize(ctx, in) } -type validateOpPutFeedback struct { -} - -func (*validateOpPutFeedback) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpPutFeedback) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*PutFeedbackInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpPutFeedbackInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - type validateOpQueryAssistant struct { } @@ -690,10 +670,6 @@ func addOpNotifyRecommendationsReceivedValidationMiddleware(stack *middleware.St return stack.Initialize.Add(&validateOpNotifyRecommendationsReceived{}, middleware.After) } -func addOpPutFeedbackValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpPutFeedback{}, middleware.After) -} - func addOpQueryAssistantValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpQueryAssistant{}, middleware.After) } @@ -748,21 +724,6 @@ func validateAppIntegrationsConfiguration(v *types.AppIntegrationsConfiguration) } } -func validateFeedbackData(v *types.FeedbackData) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "FeedbackData"} - if len(v.Relevance) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("Relevance")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - func validateFilter(v *types.Filter) error { if v == nil { return nil @@ -1192,34 +1153,6 @@ func validateOpNotifyRecommendationsReceivedInput(v *NotifyRecommendationsReceiv } } -func validateOpPutFeedbackInput(v *PutFeedbackInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "PutFeedbackInput"} - if v.AssistantId == nil { - invalidParams.Add(smithy.NewErrParamRequired("AssistantId")) - } - if v.TargetId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TargetId")) - } - if len(v.TargetType) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("TargetType")) - } - if v.Feedback == nil { - invalidParams.Add(smithy.NewErrParamRequired("Feedback")) - } else if v.Feedback != nil { - if err := validateFeedbackData(v.Feedback); err != nil { - invalidParams.AddNested("Feedback", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - func validateOpQueryAssistantInput(v *QueryAssistantInput) error { if v == nil { return nil