From 7d62062ba2ce184f3976938531cfa74914250327 Mon Sep 17 00:00:00 2001 From: AWS SDK for Go v2 automation user Date: Mon, 26 Aug 2024 18:27:06 +0000 Subject: [PATCH] Regenerated Clients --- .../ab4c5e77a75846aabae3cbee871b278e.json | 8 + .../e55ec7bb4014492fa2e971d49efde154.json | 8 + .../attributevalue/go_module_metadata.go | 2 +- .../api_op_CreateAssetModelCompositeModel.go | 17 +++ .../iotsitewise/api_op_DeleteAssetModel.go | 17 +++ .../api_op_DeleteAssetModelCompositeModel.go | 17 +++ .../iotsitewise/api_op_DescribeAssetModel.go | 21 +++ ...api_op_DescribeAssetModelCompositeModel.go | 7 + .../api_op_ListAssetModelCompositeModels.go | 7 + .../api_op_ListAssetModelProperties.go | 7 + service/iotsitewise/api_op_ListAssetModels.go | 14 +- .../api_op_ListAssociatedAssets.go | 16 +- .../iotsitewise/api_op_UpdateAssetModel.go | 17 +++ .../api_op_UpdateAssetModelCompositeModel.go | 17 +++ service/iotsitewise/deserializers.go | 144 ++++++++++++++++++ service/iotsitewise/serializers.go | 95 ++++++++++++ service/iotsitewise/types/enums.go | 19 +++ service/iotsitewise/types/errors.go | 29 ++++ service/iotsitewise/types/types.go | 3 + .../api_op_DescribeWorkspaceDirectories.go | 6 + .../api_op_RegisterWorkspaceDirectory.go | 6 + service/workspaces/deserializers.go | 108 +++++++++++++ service/workspaces/serializers.go | 79 ++++++++++ ...pi_op_DescribeWorkspaceDirectories.go.snap | 1 + service/workspaces/types/enums.go | 34 ++++- service/workspaces/types/types.go | 46 ++++++ service/workspaces/validators.go | 76 +++++++++ 27 files changed, 803 insertions(+), 18 deletions(-) create mode 100644 .changelog/ab4c5e77a75846aabae3cbee871b278e.json create mode 100644 .changelog/e55ec7bb4014492fa2e971d49efde154.json diff --git a/.changelog/ab4c5e77a75846aabae3cbee871b278e.json b/.changelog/ab4c5e77a75846aabae3cbee871b278e.json new file mode 100644 index 00000000000..f58d8627007 --- /dev/null +++ b/.changelog/ab4c5e77a75846aabae3cbee871b278e.json @@ -0,0 +1,8 @@ +{ + "id": "ab4c5e77-a758-46aa-bae3-cbee871b278e", + "type": "feature", + "description": "AWS IoT SiteWise now supports versioning for asset models. It enables users to retrieve active version of their asset model and perform asset model writes with optimistic lock.", + "modules": [ + "service/iotsitewise" + ] +} \ No newline at end of file diff --git a/.changelog/e55ec7bb4014492fa2e971d49efde154.json b/.changelog/e55ec7bb4014492fa2e971d49efde154.json new file mode 100644 index 00000000000..22ffacf7e9f --- /dev/null +++ b/.changelog/e55ec7bb4014492fa2e971d49efde154.json @@ -0,0 +1,8 @@ +{ + "id": "e55ec7bb-4014-492f-a2e9-71d49efde154", + "type": "feature", + "description": "This release adds support for creating and managing directories that use AWS IAM Identity Center as user identity source. Such directories can be used to create non-Active Directory domain joined WorkSpaces Personal.Updated RegisterWorkspaceDirectory and DescribeWorkspaceDirectories APIs.", + "modules": [ + "service/workspaces" + ] +} \ No newline at end of file diff --git a/feature/dynamodbstreams/attributevalue/go_module_metadata.go b/feature/dynamodbstreams/attributevalue/go_module_metadata.go index e44c359c409..fe01ee88a8e 100644 --- a/feature/dynamodbstreams/attributevalue/go_module_metadata.go +++ b/feature/dynamodbstreams/attributevalue/go_module_metadata.go @@ -3,4 +3,4 @@ package attributevalue // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.13.71" +const goModuleVersion = "1.14.12" diff --git a/service/iotsitewise/api_op_CreateAssetModelCompositeModel.go b/service/iotsitewise/api_op_CreateAssetModelCompositeModel.go index e140c0ef455..43aa3984735 100644 --- a/service/iotsitewise/api_op_CreateAssetModelCompositeModel.go +++ b/service/iotsitewise/api_op_CreateAssetModelCompositeModel.go @@ -101,6 +101,23 @@ type CreateAssetModelCompositeModelInput struct { // The ID of a component model which is reused to create this composite model. ComposedAssetModelId *string + // The expected current entity tag (ETag) for the asset model’s latest or active + // version (specified using matchForVersionType ). The create request is rejected + // if the tag does not match the latest or active version's current entity tag. See + // [Optimistic locking for asset model writes]in the IoT SiteWise User Guide. + // + // [Optimistic locking for asset model writes]: https://docs.aws.amazon.com/iot-sitewise/latest/userguide/opt-locking-for-model.html + IfMatch *string + + // Accepts * to reject the create request if an active version (specified using + // matchForVersionType as ACTIVE ) already exists for the asset model. + IfNoneMatch *string + + // Specifies the asset model version type ( LATEST or ACTIVE ) used in conjunction + // with If-Match or If-None-Match headers to determine the target ETag for the + // create operation. + MatchForVersionType types.AssetModelVersionType + // The ID of the parent composite model in this asset model relationship. ParentAssetModelCompositeModelId *string diff --git a/service/iotsitewise/api_op_DeleteAssetModel.go b/service/iotsitewise/api_op_DeleteAssetModel.go index c0508c5f157..b42b4321743 100644 --- a/service/iotsitewise/api_op_DeleteAssetModel.go +++ b/service/iotsitewise/api_op_DeleteAssetModel.go @@ -49,6 +49,23 @@ type DeleteAssetModelInput struct { // request is required. ClientToken *string + // The expected current entity tag (ETag) for the asset model’s latest or active + // version (specified using matchForVersionType ). The delete request is rejected + // if the tag does not match the latest or active version's current entity tag. See + // [Optimistic locking for asset model writes]in the IoT SiteWise User Guide. + // + // [Optimistic locking for asset model writes]: https://docs.aws.amazon.com/iot-sitewise/latest/userguide/opt-locking-for-model.html + IfMatch *string + + // Accepts * to reject the delete request if an active version (specified using + // matchForVersionType as ACTIVE ) already exists for the asset model. + IfNoneMatch *string + + // Specifies the asset model version type ( LATEST or ACTIVE ) used in conjunction + // with If-Match or If-None-Match headers to determine the target ETag for the + // delete operation. + MatchForVersionType types.AssetModelVersionType + noSmithyDocumentSerde } diff --git a/service/iotsitewise/api_op_DeleteAssetModelCompositeModel.go b/service/iotsitewise/api_op_DeleteAssetModelCompositeModel.go index 71095191850..fda8c57bd8a 100644 --- a/service/iotsitewise/api_op_DeleteAssetModelCompositeModel.go +++ b/service/iotsitewise/api_op_DeleteAssetModelCompositeModel.go @@ -50,6 +50,23 @@ type DeleteAssetModelCompositeModelInput struct { // request is required. ClientToken *string + // The expected current entity tag (ETag) for the asset model’s latest or active + // version (specified using matchForVersionType ). The delete request is rejected + // if the tag does not match the latest or active version's current entity tag. See + // [Optimistic locking for asset model writes]in the IoT SiteWise User Guide. + // + // [Optimistic locking for asset model writes]: https://docs.aws.amazon.com/iot-sitewise/latest/userguide/opt-locking-for-model.html + IfMatch *string + + // Accepts * to reject the delete request if an active version (specified using + // matchForVersionType as ACTIVE ) already exists for the asset model. + IfNoneMatch *string + + // Specifies the asset model version type ( LATEST or ACTIVE ) used in conjunction + // with If-Match or If-None-Match headers to determine the target ETag for the + // delete operation. + MatchForVersionType types.AssetModelVersionType + noSmithyDocumentSerde } diff --git a/service/iotsitewise/api_op_DescribeAssetModel.go b/service/iotsitewise/api_op_DescribeAssetModel.go index d192224ef2f..cd6b1d97347 100644 --- a/service/iotsitewise/api_op_DescribeAssetModel.go +++ b/service/iotsitewise/api_op_DescribeAssetModel.go @@ -43,6 +43,13 @@ type DescribeAssetModelInput struct { // This member is required. AssetModelId *string + // The version alias that specifies the latest or active version of the asset + // model. The details are returned in the response. The default value is LATEST . + // See [Asset model versions]in the IoT SiteWise User Guide. + // + // [Asset model versions]: https://docs.aws.amazon.com/iot-sitewise/latest/userguide/model-active-version.html + AssetModelVersion *string + // Whether or not to exclude asset model properties from the response. ExcludeProperties bool @@ -127,6 +134,20 @@ type DescribeAssetModelOutput struct { // this type of asset model. AssetModelType types.AssetModelType + // The version of the asset model. See [Asset model versions] in the IoT SiteWise User Guide. + // + // [Asset model versions]: https://docs.aws.amazon.com/iot-sitewise/latest/userguide/model-active-version.html + AssetModelVersion *string + + // The entity tag (ETag) is a hash of the retrieved version of the asset model. + // It's used to make concurrent updates safely to the resource. See [Optimistic locking for asset model writes]in the IoT + // SiteWise User Guide. + // + // See [Optimistic locking for asset model writes] in the IoT SiteWise User Guide. + // + // [Optimistic locking for asset model writes]: https://docs.aws.amazon.com/iot-sitewise/latest/userguide/opt-locking-for-model.html + ETag *string + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/iotsitewise/api_op_DescribeAssetModelCompositeModel.go b/service/iotsitewise/api_op_DescribeAssetModelCompositeModel.go index 87288fb18d2..ed2e548fef0 100644 --- a/service/iotsitewise/api_op_DescribeAssetModelCompositeModel.go +++ b/service/iotsitewise/api_op_DescribeAssetModelCompositeModel.go @@ -51,6 +51,13 @@ type DescribeAssetModelCompositeModelInput struct { // This member is required. AssetModelId *string + // The version alias that specifies the latest or active version of the asset + // model. The details are returned in the response. The default value is LATEST . + // See [Asset model versions]in the IoT SiteWise User Guide. + // + // [Asset model versions]: https://docs.aws.amazon.com/iot-sitewise/latest/userguide/model-active-version.html + AssetModelVersion *string + noSmithyDocumentSerde } diff --git a/service/iotsitewise/api_op_ListAssetModelCompositeModels.go b/service/iotsitewise/api_op_ListAssetModelCompositeModels.go index 3bacd3fb20c..8a0e698b0b8 100644 --- a/service/iotsitewise/api_op_ListAssetModelCompositeModels.go +++ b/service/iotsitewise/api_op_ListAssetModelCompositeModels.go @@ -38,6 +38,13 @@ type ListAssetModelCompositeModelsInput struct { // This member is required. AssetModelId *string + // The version alias that specifies the latest or active version of the asset + // model. The details are returned in the response. The default value is LATEST . + // See [Asset model versions]in the IoT SiteWise User Guide. + // + // [Asset model versions]: https://docs.aws.amazon.com/iot-sitewise/latest/userguide/model-active-version.html + AssetModelVersion *string + // The maximum number of results to return for each paginated request. // // Default: 50 diff --git a/service/iotsitewise/api_op_ListAssetModelProperties.go b/service/iotsitewise/api_op_ListAssetModelProperties.go index 86c6a2a48c0..f94aded5fdb 100644 --- a/service/iotsitewise/api_op_ListAssetModelProperties.go +++ b/service/iotsitewise/api_op_ListAssetModelProperties.go @@ -40,6 +40,13 @@ type ListAssetModelPropertiesInput struct { // This member is required. AssetModelId *string + // The version alias that specifies the latest or active version of the asset + // model. The details are returned in the response. The default value is LATEST . + // See [Asset model versions]in the IoT SiteWise User Guide. + // + // [Asset model versions]: https://docs.aws.amazon.com/iot-sitewise/latest/userguide/model-active-version.html + AssetModelVersion *string + // Filters the requested list of asset model properties. You can choose one of // the following options: // diff --git a/service/iotsitewise/api_op_ListAssetModels.go b/service/iotsitewise/api_op_ListAssetModels.go index b4d1a526275..35c8a87e6ac 100644 --- a/service/iotsitewise/api_op_ListAssetModels.go +++ b/service/iotsitewise/api_op_ListAssetModels.go @@ -29,16 +29,24 @@ func (c *Client) ListAssetModels(ctx context.Context, params *ListAssetModelsInp type ListAssetModelsInput struct { - // The type of asset model. + // The type of asset model. If you don't provide an assetModelTypes , all types of + // asset models are returned. // - // - ASSET_MODEL – (default) An asset model that you can use to create assets. - // Can't be included as a component in another asset model. + // - ASSET_MODEL – An asset model that you can use to create assets. Can't be + // included as a component in another asset model. // // - COMPONENT_MODEL – A reusable component that you can include in the // composite models of other asset models. You can't create assets directly from // this type of asset model. AssetModelTypes []types.AssetModelType + // The version alias that specifies the latest or active version of the asset + // model. The details are returned in the response. The default value is LATEST . + // See [Asset model versions]in the IoT SiteWise User Guide. + // + // [Asset model versions]: https://docs.aws.amazon.com/iot-sitewise/latest/userguide/model-active-version.html + AssetModelVersion *string + // The maximum number of results to return for each paginated request. // // Default: 50 diff --git a/service/iotsitewise/api_op_ListAssociatedAssets.go b/service/iotsitewise/api_op_ListAssociatedAssets.go index 38de29cf841..2f37e82dafa 100644 --- a/service/iotsitewise/api_op_ListAssociatedAssets.go +++ b/service/iotsitewise/api_op_ListAssociatedAssets.go @@ -15,10 +15,9 @@ import ( // // You can use this operation to do the following: // -// - List child assets associated to a parent asset by a hierarchy that you -// specify. +// - CHILD - List all child assets associated to the asset. // -// - List an asset's parent asset. +// - PARENT - List the asset's parent asset. func (c *Client) ListAssociatedAssets(ctx context.Context, params *ListAssociatedAssetsInput, optFns ...func(*Options)) (*ListAssociatedAssetsOutput, error) { if params == nil { params = &ListAssociatedAssetsInput{} @@ -45,17 +44,17 @@ type ListAssociatedAssetsInput struct { // This member is required. AssetId *string + // (Optional) If you don't provide a hierarchyId , all the immediate assets in the + // traversalDirection will be returned. + // // The ID of the hierarchy by which child assets are associated to the asset. // (This can be either the actual ID in UUID format, or else externalId: followed // by the external ID, if it has one. For more information, see [Referencing objects with external IDs]in the IoT - // SiteWise User Guide.) To find a hierarchy ID, use the [DescribeAsset]or [DescribeAssetModel] operations. This - // parameter is required if you choose CHILD for traversalDirection . + // SiteWise User Guide.) // // For more information, see [Asset hierarchies] in the IoT SiteWise User Guide. // // [Asset hierarchies]: https://docs.aws.amazon.com/iot-sitewise/latest/userguide/asset-hierarchies.html - // [DescribeAssetModel]: https://docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_DescribeAssetModel.html - // [DescribeAsset]: https://docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_DescribeAsset.html // [Referencing objects with external IDs]: https://docs.aws.amazon.com/iot-sitewise/latest/userguide/object-ids.html#external-id-references HierarchyId *string @@ -69,8 +68,7 @@ type ListAssociatedAssetsInput struct { // The direction to list associated assets. Choose one of the following options: // - // - CHILD – The list includes all child assets associated to the asset. The - // hierarchyId parameter is required if you choose CHILD . + // - CHILD – The list includes all child assets associated to the asset. // // - PARENT – The list includes the asset's parent asset. // diff --git a/service/iotsitewise/api_op_UpdateAssetModel.go b/service/iotsitewise/api_op_UpdateAssetModel.go index 460807fb808..99703b69a8e 100644 --- a/service/iotsitewise/api_op_UpdateAssetModel.go +++ b/service/iotsitewise/api_op_UpdateAssetModel.go @@ -110,6 +110,23 @@ type UpdateAssetModelInput struct { // request is required. ClientToken *string + // The expected current entity tag (ETag) for the asset model’s latest or active + // version (specified using matchForVersionType ). The update request is rejected + // if the tag does not match the latest or active version's current entity tag. See + // [Optimistic locking for asset model writes]in the IoT SiteWise User Guide. + // + // [Optimistic locking for asset model writes]: https://docs.aws.amazon.com/iot-sitewise/latest/userguide/opt-locking-for-model.html + IfMatch *string + + // Accepts * to reject the update request if an active version (specified using + // matchForVersionType as ACTIVE ) already exists for the asset model. + IfNoneMatch *string + + // Specifies the asset model version type ( LATEST or ACTIVE ) used in conjunction + // with If-Match or If-None-Match headers to determine the target ETag for the + // update operation. + MatchForVersionType types.AssetModelVersionType + noSmithyDocumentSerde } diff --git a/service/iotsitewise/api_op_UpdateAssetModelCompositeModel.go b/service/iotsitewise/api_op_UpdateAssetModelCompositeModel.go index be3f59cc54b..c575e382681 100644 --- a/service/iotsitewise/api_op_UpdateAssetModelCompositeModel.go +++ b/service/iotsitewise/api_op_UpdateAssetModelCompositeModel.go @@ -86,6 +86,23 @@ type UpdateAssetModelCompositeModelInput struct { // request is required. ClientToken *string + // The expected current entity tag (ETag) for the asset model’s latest or active + // version (specified using matchForVersionType ). The update request is rejected + // if the tag does not match the latest or active version's current entity tag. See + // [Optimistic locking for asset model writes]in the IoT SiteWise User Guide. + // + // [Optimistic locking for asset model writes]: https://docs.aws.amazon.com/iot-sitewise/latest/userguide/opt-locking-for-model.html + IfMatch *string + + // Accepts * to reject the update request if an active version (specified using + // matchForVersionType as ACTIVE ) already exists for the asset model. + IfNoneMatch *string + + // Specifies the asset model version type ( LATEST or ACTIVE ) used in conjunction + // with If-Match or If-None-Match headers to determine the target ETag for the + // update operation. + MatchForVersionType types.AssetModelVersionType + noSmithyDocumentSerde } diff --git a/service/iotsitewise/deserializers.go b/service/iotsitewise/deserializers.go index 744601b98b1..5451faccd92 100644 --- a/service/iotsitewise/deserializers.go +++ b/service/iotsitewise/deserializers.go @@ -1891,6 +1891,9 @@ func awsRestjson1_deserializeOpErrorCreateAssetModelCompositeModel(response *smi case strings.EqualFold("LimitExceededException", errorCode): return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + case strings.EqualFold("PreconditionFailedException", errorCode): + return awsRestjson1_deserializeErrorPreconditionFailedException(response, errorBody) + case strings.EqualFold("ResourceAlreadyExistsException", errorCode): return awsRestjson1_deserializeErrorResourceAlreadyExistsException(response, errorBody) @@ -3216,6 +3219,9 @@ func awsRestjson1_deserializeOpErrorDeleteAssetModel(response *smithyhttp.Respon case strings.EqualFold("InvalidRequestException", errorCode): return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + case strings.EqualFold("PreconditionFailedException", errorCode): + return awsRestjson1_deserializeErrorPreconditionFailedException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -3375,6 +3381,9 @@ func awsRestjson1_deserializeOpErrorDeleteAssetModelCompositeModel(response *smi case strings.EqualFold("InvalidRequestException", errorCode): return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) + case strings.EqualFold("PreconditionFailedException", errorCode): + return awsRestjson1_deserializeErrorPreconditionFailedException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -4900,6 +4909,11 @@ func (m *awsRestjson1_deserializeOpDescribeAssetModel) HandleDeserialize(ctx con output := &DescribeAssetModelOutput{} out.Result = output + err = awsRestjson1_deserializeOpHttpBindingsDescribeAssetModelOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -4994,6 +5008,18 @@ func awsRestjson1_deserializeOpErrorDescribeAssetModel(response *smithyhttp.Resp } } +func awsRestjson1_deserializeOpHttpBindingsDescribeAssetModelOutput(v *DescribeAssetModelOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ETag = ptr.String(headerValues[0]) + } + + return nil +} func awsRestjson1_deserializeOpDocumentDescribeAssetModelOutput(v **DescribeAssetModelOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -5127,6 +5153,15 @@ func awsRestjson1_deserializeOpDocumentDescribeAssetModelOutput(v **DescribeAsse sv.AssetModelType = types.AssetModelType(jtv) } + case "assetModelVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Version to be of type string, got %T instead", value) + } + sv.AssetModelVersion = ptr.String(jtv) + } + default: _, _ = key, value @@ -12975,6 +13010,9 @@ func awsRestjson1_deserializeOpErrorUpdateAssetModel(response *smithyhttp.Respon case strings.EqualFold("LimitExceededException", errorCode): return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + case strings.EqualFold("PreconditionFailedException", errorCode): + return awsRestjson1_deserializeErrorPreconditionFailedException(response, errorBody) + case strings.EqualFold("ResourceAlreadyExistsException", errorCode): return awsRestjson1_deserializeErrorResourceAlreadyExistsException(response, errorBody) @@ -13140,6 +13178,9 @@ func awsRestjson1_deserializeOpErrorUpdateAssetModelCompositeModel(response *smi case strings.EqualFold("LimitExceededException", errorCode): return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + case strings.EqualFold("PreconditionFailedException", errorCode): + return awsRestjson1_deserializeErrorPreconditionFailedException(response, errorBody) + case strings.EqualFold("ResourceAlreadyExistsException", errorCode): return awsRestjson1_deserializeErrorResourceAlreadyExistsException(response, errorBody) @@ -14100,6 +14141,42 @@ func awsRestjson1_deserializeErrorLimitExceededException(response *smithyhttp.Re return output } +func awsRestjson1_deserializeErrorPreconditionFailedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.PreconditionFailedException{} + 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 + } + + err := awsRestjson1_deserializeDocumentPreconditionFailedException(&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 awsRestjson1_deserializeErrorQueryTimeoutException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.QueryTimeoutException{} var buff [1024]byte @@ -16656,6 +16733,15 @@ func awsRestjson1_deserializeDocumentAssetModelSummary(v **types.AssetModelSumma return err } + case "version": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Version to be of type string, got %T instead", value) + } + sv.Version = ptr.String(jtv) + } + default: _, _ = key, value @@ -21545,6 +21631,64 @@ func awsRestjson1_deserializeDocumentPortalSummary(v **types.PortalSummary, valu return nil } +func awsRestjson1_deserializeDocumentPreconditionFailedException(v **types.PreconditionFailedException, 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.PreconditionFailedException + if *v == nil { + sv = &types.PreconditionFailedException{} + } 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 ErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "resourceArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) + } + sv.ResourceArn = ptr.String(jtv) + } + + case "resourceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) + } + sv.ResourceId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentProjectResource(v **types.ProjectResource, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/iotsitewise/serializers.go b/service/iotsitewise/serializers.go index b237ec0d233..a3b2eb94bc8 100644 --- a/service/iotsitewise/serializers.go +++ b/service/iotsitewise/serializers.go @@ -1137,6 +1137,21 @@ func awsRestjson1_serializeOpHttpBindingsCreateAssetModelCompositeModelInput(v * } } + if v.IfMatch != nil && len(*v.IfMatch) > 0 { + locationName := "If-Match" + encoder.SetHeader(locationName).String(*v.IfMatch) + } + + if v.IfNoneMatch != nil && len(*v.IfNoneMatch) > 0 { + locationName := "If-None-Match" + encoder.SetHeader(locationName).String(*v.IfNoneMatch) + } + + if len(v.MatchForVersionType) > 0 { + locationName := "Match-For-Version-Type" + encoder.SetHeader(locationName).String(string(v.MatchForVersionType)) + } + return nil } @@ -1923,6 +1938,21 @@ func awsRestjson1_serializeOpHttpBindingsDeleteAssetModelInput(v *DeleteAssetMod encoder.SetQuery("clientToken").String(*v.ClientToken) } + if v.IfMatch != nil && len(*v.IfMatch) > 0 { + locationName := "If-Match" + encoder.SetHeader(locationName).String(*v.IfMatch) + } + + if v.IfNoneMatch != nil && len(*v.IfNoneMatch) > 0 { + locationName := "If-None-Match" + encoder.SetHeader(locationName).String(*v.IfNoneMatch) + } + + if len(v.MatchForVersionType) > 0 { + locationName := "Match-For-Version-Type" + encoder.SetHeader(locationName).String(string(v.MatchForVersionType)) + } + return nil } @@ -2001,6 +2031,21 @@ func awsRestjson1_serializeOpHttpBindingsDeleteAssetModelCompositeModelInput(v * encoder.SetQuery("clientToken").String(*v.ClientToken) } + if v.IfMatch != nil && len(*v.IfMatch) > 0 { + locationName := "If-Match" + encoder.SetHeader(locationName).String(*v.IfMatch) + } + + if v.IfNoneMatch != nil && len(*v.IfNoneMatch) > 0 { + locationName := "If-None-Match" + encoder.SetHeader(locationName).String(*v.IfNoneMatch) + } + + if len(v.MatchForVersionType) > 0 { + locationName := "Match-For-Version-Type" + encoder.SetHeader(locationName).String(string(v.MatchForVersionType)) + } + return nil } @@ -2702,6 +2747,10 @@ func awsRestjson1_serializeOpHttpBindingsDescribeAssetModelInput(v *DescribeAsse } } + if v.AssetModelVersion != nil { + encoder.SetQuery("assetModelVersion").String(*v.AssetModelVersion) + } + if v.ExcludeProperties { encoder.SetQuery("excludeProperties").Boolean(v.ExcludeProperties) } @@ -2780,6 +2829,10 @@ func awsRestjson1_serializeOpHttpBindingsDescribeAssetModelCompositeModelInput(v } } + if v.AssetModelVersion != nil { + encoder.SetQuery("assetModelVersion").String(*v.AssetModelVersion) + } + return nil } @@ -4440,6 +4493,10 @@ func awsRestjson1_serializeOpHttpBindingsListAssetModelCompositeModelsInput(v *L } } + if v.AssetModelVersion != nil { + encoder.SetQuery("assetModelVersion").String(*v.AssetModelVersion) + } + if v.MaxResults != nil { encoder.SetQuery("maxResults").Integer(*v.MaxResults) } @@ -4513,6 +4570,10 @@ func awsRestjson1_serializeOpHttpBindingsListAssetModelPropertiesInput(v *ListAs } } + if v.AssetModelVersion != nil { + encoder.SetQuery("assetModelVersion").String(*v.AssetModelVersion) + } + if len(v.Filter) > 0 { encoder.SetQuery("filter").String(string(v.Filter)) } @@ -4587,6 +4648,10 @@ func awsRestjson1_serializeOpHttpBindingsListAssetModelsInput(v *ListAssetModels } } + if v.AssetModelVersion != nil { + encoder.SetQuery("assetModelVersion").String(*v.AssetModelVersion) + } + if v.MaxResults != nil { encoder.SetQuery("maxResults").Integer(*v.MaxResults) } @@ -6216,6 +6281,21 @@ func awsRestjson1_serializeOpHttpBindingsUpdateAssetModelInput(v *UpdateAssetMod } } + if v.IfMatch != nil && len(*v.IfMatch) > 0 { + locationName := "If-Match" + encoder.SetHeader(locationName).String(*v.IfMatch) + } + + if v.IfNoneMatch != nil && len(*v.IfNoneMatch) > 0 { + locationName := "If-None-Match" + encoder.SetHeader(locationName).String(*v.IfNoneMatch) + } + + if len(v.MatchForVersionType) > 0 { + locationName := "Match-For-Version-Type" + encoder.SetHeader(locationName).String(string(v.MatchForVersionType)) + } + return nil } @@ -6349,6 +6429,21 @@ func awsRestjson1_serializeOpHttpBindingsUpdateAssetModelCompositeModelInput(v * } } + if v.IfMatch != nil && len(*v.IfMatch) > 0 { + locationName := "If-Match" + encoder.SetHeader(locationName).String(*v.IfMatch) + } + + if v.IfNoneMatch != nil && len(*v.IfNoneMatch) > 0 { + locationName := "If-None-Match" + encoder.SetHeader(locationName).String(*v.IfNoneMatch) + } + + if len(v.MatchForVersionType) > 0 { + locationName := "Match-For-Version-Type" + encoder.SetHeader(locationName).String(string(v.MatchForVersionType)) + } + return nil } diff --git a/service/iotsitewise/types/enums.go b/service/iotsitewise/types/enums.go index 856baea91a4..d9aafe87bcd 100644 --- a/service/iotsitewise/types/enums.go +++ b/service/iotsitewise/types/enums.go @@ -92,6 +92,25 @@ func (AssetModelType) Values() []AssetModelType { } } +type AssetModelVersionType string + +// Enum values for AssetModelVersionType +const ( + AssetModelVersionTypeLatest AssetModelVersionType = "LATEST" + AssetModelVersionTypeActive AssetModelVersionType = "ACTIVE" +) + +// Values returns all known values for AssetModelVersionType. 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 (AssetModelVersionType) Values() []AssetModelVersionType { + return []AssetModelVersionType{ + "LATEST", + "ACTIVE", + } +} + type AssetRelationshipType string // Enum values for AssetRelationshipType diff --git a/service/iotsitewise/types/errors.go b/service/iotsitewise/types/errors.go index 2d9a3d62c9d..8c8598a3c3c 100644 --- a/service/iotsitewise/types/errors.go +++ b/service/iotsitewise/types/errors.go @@ -148,6 +148,35 @@ func (e *LimitExceededException) ErrorCode() string { } func (e *LimitExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } +// The precondition in one or more of the request-header fields evaluated to FALSE . +type PreconditionFailedException struct { + Message *string + + ErrorCodeOverride *string + + ResourceId *string + ResourceArn *string + + noSmithyDocumentSerde +} + +func (e *PreconditionFailedException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *PreconditionFailedException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *PreconditionFailedException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "PreconditionFailedException" + } + return *e.ErrorCodeOverride +} +func (e *PreconditionFailedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + // The query timed out. type QueryTimeoutException struct { Message *string diff --git a/service/iotsitewise/types/types.go b/service/iotsitewise/types/types.go index d4f1ff08d4d..215c6e2def9 100644 --- a/service/iotsitewise/types/types.go +++ b/service/iotsitewise/types/types.go @@ -760,6 +760,9 @@ type AssetModelSummary struct { // [Using external IDs]: https://docs.aws.amazon.com/iot-sitewise/latest/userguide/object-ids.html#external-ids ExternalId *string + // The version number of the asset model. + Version *string + noSmithyDocumentSerde } diff --git a/service/workspaces/api_op_DescribeWorkspaceDirectories.go b/service/workspaces/api_op_DescribeWorkspaceDirectories.go index 91958295fb6..6d2e01498a7 100644 --- a/service/workspaces/api_op_DescribeWorkspaceDirectories.go +++ b/service/workspaces/api_op_DescribeWorkspaceDirectories.go @@ -33,6 +33,9 @@ type DescribeWorkspaceDirectoriesInput struct { // retrieved. DirectoryIds []string + // The filter condition for the WorkSpaces. + Filters []types.DescribeWorkspaceDirectoriesFilter + // The maximum number of directories to return. Limit *int32 @@ -122,6 +125,9 @@ func (c *Client) addOperationDescribeWorkspaceDirectoriesMiddlewares(stack *midd if err = addUserAgentRetryMode(stack, options); err != nil { return err } + if err = addOpDescribeWorkspaceDirectoriesValidationMiddleware(stack); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeWorkspaceDirectories(options.Region), middleware.Before); err != nil { return err } diff --git a/service/workspaces/api_op_RegisterWorkspaceDirectory.go b/service/workspaces/api_op_RegisterWorkspaceDirectory.go index 96aadec862a..f15b4dd4e7b 100644 --- a/service/workspaces/api_op_RegisterWorkspaceDirectory.go +++ b/service/workspaces/api_op_RegisterWorkspaceDirectory.go @@ -54,6 +54,12 @@ type RegisterWorkspaceDirectoryInput struct { // again. EnableWorkDocs *bool + // The Amazon Resource Name (ARN) of the identity center instance. + IdcInstanceArn *string + + // The details about Microsoft Entra config. + MicrosoftEntraConfig *types.MicrosoftEntraConfig + // The identifiers of the subnets for your virtual private cloud (VPC). Make sure // that the subnets are in supported Availability Zones. The subnets must also be // in separate Availability Zones. If these conditions are not met, you will diff --git a/service/workspaces/deserializers.go b/service/workspaces/deserializers.go index d5696ff6e19..a1581136ac6 100644 --- a/service/workspaces/deserializers.go +++ b/service/workspaces/deserializers.go @@ -13392,6 +13392,55 @@ func awsAwsjson11_deserializeDocumentFailedWorkspaceChangeRequest(v **types.Fail return nil } +func awsAwsjson11_deserializeDocumentIDCConfig(v **types.IDCConfig, 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.IDCConfig + if *v == nil { + sv = &types.IDCConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ApplicationArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ARN to be of type string, got %T instead", value) + } + sv.ApplicationArn = ptr.String(jtv) + } + + case "InstanceArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ARN to be of type string, got %T instead", value) + } + sv.InstanceArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentImagePermission(v **types.ImagePermission, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -14000,6 +14049,55 @@ func awsAwsjson11_deserializeDocumentLoginMessage(v *map[string]string, value in return nil } +func awsAwsjson11_deserializeDocumentMicrosoftEntraConfig(v **types.MicrosoftEntraConfig, 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.MicrosoftEntraConfig + if *v == nil { + sv = &types.MicrosoftEntraConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ApplicationConfigSecretArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SecretsManagerArn to be of type string, got %T instead", value) + } + sv.ApplicationConfigSecretArn = ptr.String(jtv) + } + + case "TenantId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MicrosoftEntraConfigTenantId to be of type string, got %T instead", value) + } + sv.TenantId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentModificationState(v **types.ModificationState, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -16748,11 +16846,21 @@ func awsAwsjson11_deserializeDocumentWorkspaceDirectory(v **types.WorkspaceDirec sv.IamRoleId = ptr.String(jtv) } + case "IDCConfig": + if err := awsAwsjson11_deserializeDocumentIDCConfig(&sv.IDCConfig, value); err != nil { + return err + } + case "ipGroupIds": if err := awsAwsjson11_deserializeDocumentIpGroupIdList(&sv.IpGroupIds, value); err != nil { return err } + case "MicrosoftEntraConfig": + if err := awsAwsjson11_deserializeDocumentMicrosoftEntraConfig(&sv.MicrosoftEntraConfig, value); err != nil { + return err + } + case "RegistrationCode": if value != nil { jtv, ok := value.(string) diff --git a/service/workspaces/serializers.go b/service/workspaces/serializers.go index d4b14305a5c..45ca6820831 100644 --- a/service/workspaces/serializers.go +++ b/service/workspaces/serializers.go @@ -5096,6 +5096,49 @@ func awsAwsjson11_serializeDocumentDeletableSamlPropertiesList(v []types.Deletab return nil } +func awsAwsjson11_serializeDocumentDescribeWorkspaceDirectoriesFilter(v *types.DescribeWorkspaceDirectoriesFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Name) > 0 { + ok := object.Key("Name") + ok.String(string(v.Name)) + } + + if v.Values != nil { + ok := object.Key("Values") + if err := awsAwsjson11_serializeDocumentDescribeWorkspaceDirectoriesFilterValues(v.Values, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentDescribeWorkspaceDirectoriesFilterList(v []types.DescribeWorkspaceDirectoriesFilter, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentDescribeWorkspaceDirectoriesFilter(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentDescribeWorkspaceDirectoriesFilterValues(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + func awsAwsjson11_serializeDocumentDescribeWorkspacesPoolsFilter(v *types.DescribeWorkspacesPoolsFilter, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -5284,6 +5327,23 @@ func awsAwsjson11_serializeDocumentLoginMessage(v map[string]string, value smith return nil } +func awsAwsjson11_serializeDocumentMicrosoftEntraConfig(v *types.MicrosoftEntraConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ApplicationConfigSecretArn != nil { + ok := object.Key("ApplicationConfigSecretArn") + ok.String(*v.ApplicationConfigSecretArn) + } + + if v.TenantId != nil { + ok := object.Key("TenantId") + ok.String(*v.TenantId) + } + + return nil +} + func awsAwsjson11_serializeDocumentOperatingSystemNameList(v []types.OperatingSystemName, value smithyjson.Value) error { array := value.Array() defer array.Close() @@ -6899,6 +6959,13 @@ func awsAwsjson11_serializeOpDocumentDescribeWorkspaceDirectoriesInput(v *Descri } } + if v.Filters != nil { + ok := object.Key("Filters") + if err := awsAwsjson11_serializeDocumentDescribeWorkspaceDirectoriesFilterList(v.Filters, ok); err != nil { + return err + } + } + if v.Limit != nil { ok := object.Key("Limit") ok.Integer(*v.Limit) @@ -7585,6 +7652,18 @@ func awsAwsjson11_serializeOpDocumentRegisterWorkspaceDirectoryInput(v *Register ok.Boolean(*v.EnableWorkDocs) } + if v.IdcInstanceArn != nil { + ok := object.Key("IdcInstanceArn") + ok.String(*v.IdcInstanceArn) + } + + if v.MicrosoftEntraConfig != nil { + ok := object.Key("MicrosoftEntraConfig") + if err := awsAwsjson11_serializeDocumentMicrosoftEntraConfig(v.MicrosoftEntraConfig, ok); err != nil { + return err + } + } + if v.SubnetIds != nil { ok := object.Key("SubnetIds") if err := awsAwsjson11_serializeDocumentSubnetIds(v.SubnetIds, ok); err != nil { diff --git a/service/workspaces/snapshot/api_op_DescribeWorkspaceDirectories.go.snap b/service/workspaces/snapshot/api_op_DescribeWorkspaceDirectories.go.snap index a8a2bdd8bf5..7a349c170eb 100644 --- a/service/workspaces/snapshot/api_op_DescribeWorkspaceDirectories.go.snap +++ b/service/workspaces/snapshot/api_op_DescribeWorkspaceDirectories.go.snap @@ -3,6 +3,7 @@ DescribeWorkspaceDirectories RegisterServiceMetadata legacyEndpointContextSetter SetLogger + OperationInputValidation Serialize stack step setOperationInput ResolveEndpoint diff --git a/service/workspaces/types/enums.go b/service/workspaces/types/enums.go index 2586c4e084e..973f9dc2744 100644 --- a/service/workspaces/types/enums.go +++ b/service/workspaces/types/enums.go @@ -500,6 +500,26 @@ func (DeletableSamlProperty) Values() []DeletableSamlProperty { } } +type DescribeWorkspaceDirectoriesFilterName string + +// Enum values for DescribeWorkspaceDirectoriesFilterName +const ( + DescribeWorkspaceDirectoriesFilterNameUserIdentityType DescribeWorkspaceDirectoriesFilterName = "USER_IDENTITY_TYPE" + DescribeWorkspaceDirectoriesFilterNameWorkspaceType DescribeWorkspaceDirectoriesFilterName = "WORKSPACE_TYPE" +) + +// Values returns all known values for DescribeWorkspaceDirectoriesFilterName. +// 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 (DescribeWorkspaceDirectoriesFilterName) Values() []DescribeWorkspaceDirectoriesFilterName { + return []DescribeWorkspaceDirectoriesFilterName{ + "USER_IDENTITY_TYPE", + "WORKSPACE_TYPE", + } +} + type DescribeWorkspacesPoolsFilterName string // Enum values for DescribeWorkspacesPoolsFilterName @@ -912,8 +932,9 @@ type UserIdentityType string // Enum values for UserIdentityType const ( - UserIdentityTypeCustomerManaged UserIdentityType = "CUSTOMER_MANAGED" - UserIdentityTypeAwsDirectoryService UserIdentityType = "AWS_DIRECTORY_SERVICE" + UserIdentityTypeCustomerManaged UserIdentityType = "CUSTOMER_MANAGED" + UserIdentityTypeAwsDirectoryService UserIdentityType = "AWS_DIRECTORY_SERVICE" + UserIdentityTypeAwsIamIdentityCenter UserIdentityType = "AWS_IAM_IDENTITY_CENTER" ) // Values returns all known values for UserIdentityType. Note that this can be @@ -924,6 +945,7 @@ func (UserIdentityType) Values() []UserIdentityType { return []UserIdentityType{ "CUSTOMER_MANAGED", "AWS_DIRECTORY_SERVICE", + "AWS_IAM_IDENTITY_CENTER", } } @@ -1080,9 +1102,10 @@ type WorkspaceDirectoryType string // Enum values for WorkspaceDirectoryType const ( - WorkspaceDirectoryTypeSimpleAd WorkspaceDirectoryType = "SIMPLE_AD" - WorkspaceDirectoryTypeAdConnector WorkspaceDirectoryType = "AD_CONNECTOR" - WorkspaceDirectoryTypeCustomerManaged WorkspaceDirectoryType = "CUSTOMER_MANAGED" + WorkspaceDirectoryTypeSimpleAd WorkspaceDirectoryType = "SIMPLE_AD" + WorkspaceDirectoryTypeAdConnector WorkspaceDirectoryType = "AD_CONNECTOR" + WorkspaceDirectoryTypeCustomerManaged WorkspaceDirectoryType = "CUSTOMER_MANAGED" + WorkspaceDirectoryTypeAwsIamIdentityCenter WorkspaceDirectoryType = "AWS_IAM_IDENTITY_CENTER" ) // Values returns all known values for WorkspaceDirectoryType. Note that this can @@ -1094,6 +1117,7 @@ func (WorkspaceDirectoryType) Values() []WorkspaceDirectoryType { "SIMPLE_AD", "AD_CONNECTOR", "CUSTOMER_MANAGED", + "AWS_IAM_IDENTITY_CENTER", } } diff --git a/service/workspaces/types/types.go b/service/workspaces/types/types.go index e15751a0a22..ad3b395a65f 100644 --- a/service/workspaces/types/types.go +++ b/service/workspaces/types/types.go @@ -509,6 +509,22 @@ type DefaultWorkspaceCreationProperties struct { noSmithyDocumentSerde } +// Describes the filter conditions for the WorkSpaces to return. +type DescribeWorkspaceDirectoriesFilter struct { + + // The name of the WorkSpaces to filter. + // + // This member is required. + Name DescribeWorkspaceDirectoriesFilterName + + // The values for filtering WorkSpaces + // + // This member is required. + Values []string + + noSmithyDocumentSerde +} + // Describes the filter conditions for WorkSpaces Pools to return. type DescribeWorkspacesPoolsFilter struct { @@ -592,6 +608,18 @@ type FailedWorkspaceChangeRequest struct { noSmithyDocumentSerde } +// Specifies the configurations of the identity center. +type IDCConfig struct { + + // The Amazon Resource Name (ARN) of the application. + ApplicationArn *string + + // The Amazon Resource Name (ARN) of the identity center instance. + InstanceArn *string + + noSmithyDocumentSerde +} + // Describes the Amazon Web Services accounts that have been granted permission to // use a shared image. For more information about sharing images, see [Share or Unshare a Custom WorkSpaces Image]. // @@ -774,6 +802,18 @@ type IpRuleItem struct { noSmithyDocumentSerde } +// Specifies the configurations of the Microsoft Entra. +type MicrosoftEntraConfig struct { + + // The Amazon Resource Name (ARN) of the application config. + ApplicationConfigSecretArn *string + + // The identifier of the tenant. + TenantId *string + + noSmithyDocumentSerde +} + // Describes a WorkSpace modification. type ModificationState struct { @@ -1494,6 +1534,9 @@ type WorkspaceDirectory struct { // The error message returned. ErrorMessage *string + // Specifies details about identity center configurations. + IDCConfig *IDCConfig + // The identifier of the IAM role. This is the role that allows Amazon WorkSpaces // to make calls to other services, such as Amazon EC2, on your behalf. IamRoleId *string @@ -1501,6 +1544,9 @@ type WorkspaceDirectory struct { // The identifiers of the IP access control groups associated with the directory. IpGroupIds []string + // Specifies details about Microsoft Entra configurations. + MicrosoftEntraConfig *MicrosoftEntraConfig + // The registration code for the directory. This is the code that users enter in // their Amazon WorkSpaces client application to connect to the directory. RegistrationCode *string diff --git a/service/workspaces/validators.go b/service/workspaces/validators.go index 076c93bc84c..c9aa088ab2b 100644 --- a/service/workspaces/validators.go +++ b/service/workspaces/validators.go @@ -710,6 +710,26 @@ func (m *validateOpDescribeWorkspaceAssociations) HandleInitialize(ctx context.C return next.HandleInitialize(ctx, in) } +type validateOpDescribeWorkspaceDirectories struct { +} + +func (*validateOpDescribeWorkspaceDirectories) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeWorkspaceDirectories) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeWorkspaceDirectoriesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeWorkspaceDirectoriesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDescribeWorkspaceImagePermissions struct { } @@ -1610,6 +1630,10 @@ func addOpDescribeWorkspaceAssociationsValidationMiddleware(stack *middleware.St return stack.Initialize.Add(&validateOpDescribeWorkspaceAssociations{}, middleware.After) } +func addOpDescribeWorkspaceDirectoriesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeWorkspaceDirectories{}, middleware.After) +} + func addOpDescribeWorkspaceImagePermissionsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeWorkspaceImagePermissions{}, middleware.After) } @@ -1828,6 +1852,41 @@ func validateConnectionAliasPermission(v *types.ConnectionAliasPermission) error } } +func validateDescribeWorkspaceDirectoriesFilter(v *types.DescribeWorkspaceDirectoriesFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeWorkspaceDirectoriesFilter"} + if len(v.Name) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.Values == nil { + invalidParams.Add(smithy.NewErrParamRequired("Values")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateDescribeWorkspaceDirectoriesFilterList(v []types.DescribeWorkspaceDirectoriesFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeWorkspaceDirectoriesFilterList"} + for i := range v { + if err := validateDescribeWorkspaceDirectoriesFilter(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateDescribeWorkspacesPoolsFilter(v *types.DescribeWorkspacesPoolsFilter) error { if v == nil { return nil @@ -2876,6 +2935,23 @@ func validateOpDescribeWorkspaceAssociationsInput(v *DescribeWorkspaceAssociatio } } +func validateOpDescribeWorkspaceDirectoriesInput(v *DescribeWorkspaceDirectoriesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeWorkspaceDirectoriesInput"} + if v.Filters != nil { + if err := validateDescribeWorkspaceDirectoriesFilterList(v.Filters); err != nil { + invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDescribeWorkspaceImagePermissionsInput(v *DescribeWorkspaceImagePermissionsInput) error { if v == nil { return nil