software.amazon.awssdk.services.workspaces.DefaultWorkSpacesClient Maven / Gradle / Ivy
Show all versions of workspaces Show documentation
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package software.amazon.awssdk.services.workspaces;
import java.util.Collections;
import java.util.List;
import java.util.function.Consumer;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.annotations.SdkInternalApi;
import software.amazon.awssdk.awscore.client.handler.AwsSyncClientHandler;
import software.amazon.awssdk.awscore.exception.AwsServiceException;
import software.amazon.awssdk.awscore.internal.AwsProtocolMetadata;
import software.amazon.awssdk.awscore.internal.AwsServiceProtocol;
import software.amazon.awssdk.awscore.retry.AwsRetryStrategy;
import software.amazon.awssdk.core.RequestOverrideConfiguration;
import software.amazon.awssdk.core.SdkPlugin;
import software.amazon.awssdk.core.SdkRequest;
import software.amazon.awssdk.core.client.config.ClientOverrideConfiguration;
import software.amazon.awssdk.core.client.config.SdkClientConfiguration;
import software.amazon.awssdk.core.client.config.SdkClientOption;
import software.amazon.awssdk.core.client.handler.ClientExecutionParams;
import software.amazon.awssdk.core.client.handler.SyncClientHandler;
import software.amazon.awssdk.core.exception.SdkClientException;
import software.amazon.awssdk.core.http.HttpResponseHandler;
import software.amazon.awssdk.core.metrics.CoreMetric;
import software.amazon.awssdk.core.retry.RetryMode;
import software.amazon.awssdk.metrics.MetricCollector;
import software.amazon.awssdk.metrics.MetricPublisher;
import software.amazon.awssdk.metrics.NoOpMetricCollector;
import software.amazon.awssdk.protocols.core.ExceptionMetadata;
import software.amazon.awssdk.protocols.json.AwsJsonProtocol;
import software.amazon.awssdk.protocols.json.AwsJsonProtocolFactory;
import software.amazon.awssdk.protocols.json.BaseAwsJsonProtocolFactory;
import software.amazon.awssdk.protocols.json.JsonOperationMetadata;
import software.amazon.awssdk.retries.api.RetryStrategy;
import software.amazon.awssdk.services.workspaces.internal.WorkSpacesServiceClientConfigurationBuilder;
import software.amazon.awssdk.services.workspaces.model.AcceptAccountLinkInvitationRequest;
import software.amazon.awssdk.services.workspaces.model.AcceptAccountLinkInvitationResponse;
import software.amazon.awssdk.services.workspaces.model.AccessDeniedException;
import software.amazon.awssdk.services.workspaces.model.ApplicationNotSupportedException;
import software.amazon.awssdk.services.workspaces.model.AssociateConnectionAliasRequest;
import software.amazon.awssdk.services.workspaces.model.AssociateConnectionAliasResponse;
import software.amazon.awssdk.services.workspaces.model.AssociateIpGroupsRequest;
import software.amazon.awssdk.services.workspaces.model.AssociateIpGroupsResponse;
import software.amazon.awssdk.services.workspaces.model.AssociateWorkspaceApplicationRequest;
import software.amazon.awssdk.services.workspaces.model.AssociateWorkspaceApplicationResponse;
import software.amazon.awssdk.services.workspaces.model.AuthorizeIpRulesRequest;
import software.amazon.awssdk.services.workspaces.model.AuthorizeIpRulesResponse;
import software.amazon.awssdk.services.workspaces.model.ComputeNotCompatibleException;
import software.amazon.awssdk.services.workspaces.model.ConflictException;
import software.amazon.awssdk.services.workspaces.model.CopyWorkspaceImageRequest;
import software.amazon.awssdk.services.workspaces.model.CopyWorkspaceImageResponse;
import software.amazon.awssdk.services.workspaces.model.CreateAccountLinkInvitationRequest;
import software.amazon.awssdk.services.workspaces.model.CreateAccountLinkInvitationResponse;
import software.amazon.awssdk.services.workspaces.model.CreateConnectClientAddInRequest;
import software.amazon.awssdk.services.workspaces.model.CreateConnectClientAddInResponse;
import software.amazon.awssdk.services.workspaces.model.CreateConnectionAliasRequest;
import software.amazon.awssdk.services.workspaces.model.CreateConnectionAliasResponse;
import software.amazon.awssdk.services.workspaces.model.CreateIpGroupRequest;
import software.amazon.awssdk.services.workspaces.model.CreateIpGroupResponse;
import software.amazon.awssdk.services.workspaces.model.CreateStandbyWorkspacesRequest;
import software.amazon.awssdk.services.workspaces.model.CreateStandbyWorkspacesResponse;
import software.amazon.awssdk.services.workspaces.model.CreateTagsRequest;
import software.amazon.awssdk.services.workspaces.model.CreateTagsResponse;
import software.amazon.awssdk.services.workspaces.model.CreateUpdatedWorkspaceImageRequest;
import software.amazon.awssdk.services.workspaces.model.CreateUpdatedWorkspaceImageResponse;
import software.amazon.awssdk.services.workspaces.model.CreateWorkspaceBundleRequest;
import software.amazon.awssdk.services.workspaces.model.CreateWorkspaceBundleResponse;
import software.amazon.awssdk.services.workspaces.model.CreateWorkspaceImageRequest;
import software.amazon.awssdk.services.workspaces.model.CreateWorkspaceImageResponse;
import software.amazon.awssdk.services.workspaces.model.CreateWorkspacesPoolRequest;
import software.amazon.awssdk.services.workspaces.model.CreateWorkspacesPoolResponse;
import software.amazon.awssdk.services.workspaces.model.CreateWorkspacesRequest;
import software.amazon.awssdk.services.workspaces.model.CreateWorkspacesResponse;
import software.amazon.awssdk.services.workspaces.model.DeleteAccountLinkInvitationRequest;
import software.amazon.awssdk.services.workspaces.model.DeleteAccountLinkInvitationResponse;
import software.amazon.awssdk.services.workspaces.model.DeleteClientBrandingRequest;
import software.amazon.awssdk.services.workspaces.model.DeleteClientBrandingResponse;
import software.amazon.awssdk.services.workspaces.model.DeleteConnectClientAddInRequest;
import software.amazon.awssdk.services.workspaces.model.DeleteConnectClientAddInResponse;
import software.amazon.awssdk.services.workspaces.model.DeleteConnectionAliasRequest;
import software.amazon.awssdk.services.workspaces.model.DeleteConnectionAliasResponse;
import software.amazon.awssdk.services.workspaces.model.DeleteIpGroupRequest;
import software.amazon.awssdk.services.workspaces.model.DeleteIpGroupResponse;
import software.amazon.awssdk.services.workspaces.model.DeleteTagsRequest;
import software.amazon.awssdk.services.workspaces.model.DeleteTagsResponse;
import software.amazon.awssdk.services.workspaces.model.DeleteWorkspaceBundleRequest;
import software.amazon.awssdk.services.workspaces.model.DeleteWorkspaceBundleResponse;
import software.amazon.awssdk.services.workspaces.model.DeleteWorkspaceImageRequest;
import software.amazon.awssdk.services.workspaces.model.DeleteWorkspaceImageResponse;
import software.amazon.awssdk.services.workspaces.model.DeployWorkspaceApplicationsRequest;
import software.amazon.awssdk.services.workspaces.model.DeployWorkspaceApplicationsResponse;
import software.amazon.awssdk.services.workspaces.model.DeregisterWorkspaceDirectoryRequest;
import software.amazon.awssdk.services.workspaces.model.DeregisterWorkspaceDirectoryResponse;
import software.amazon.awssdk.services.workspaces.model.DescribeAccountModificationsRequest;
import software.amazon.awssdk.services.workspaces.model.DescribeAccountModificationsResponse;
import software.amazon.awssdk.services.workspaces.model.DescribeAccountRequest;
import software.amazon.awssdk.services.workspaces.model.DescribeAccountResponse;
import software.amazon.awssdk.services.workspaces.model.DescribeApplicationAssociationsRequest;
import software.amazon.awssdk.services.workspaces.model.DescribeApplicationAssociationsResponse;
import software.amazon.awssdk.services.workspaces.model.DescribeApplicationsRequest;
import software.amazon.awssdk.services.workspaces.model.DescribeApplicationsResponse;
import software.amazon.awssdk.services.workspaces.model.DescribeBundleAssociationsRequest;
import software.amazon.awssdk.services.workspaces.model.DescribeBundleAssociationsResponse;
import software.amazon.awssdk.services.workspaces.model.DescribeClientBrandingRequest;
import software.amazon.awssdk.services.workspaces.model.DescribeClientBrandingResponse;
import software.amazon.awssdk.services.workspaces.model.DescribeClientPropertiesRequest;
import software.amazon.awssdk.services.workspaces.model.DescribeClientPropertiesResponse;
import software.amazon.awssdk.services.workspaces.model.DescribeConnectClientAddInsRequest;
import software.amazon.awssdk.services.workspaces.model.DescribeConnectClientAddInsResponse;
import software.amazon.awssdk.services.workspaces.model.DescribeConnectionAliasPermissionsRequest;
import software.amazon.awssdk.services.workspaces.model.DescribeConnectionAliasPermissionsResponse;
import software.amazon.awssdk.services.workspaces.model.DescribeConnectionAliasesRequest;
import software.amazon.awssdk.services.workspaces.model.DescribeConnectionAliasesResponse;
import software.amazon.awssdk.services.workspaces.model.DescribeImageAssociationsRequest;
import software.amazon.awssdk.services.workspaces.model.DescribeImageAssociationsResponse;
import software.amazon.awssdk.services.workspaces.model.DescribeIpGroupsRequest;
import software.amazon.awssdk.services.workspaces.model.DescribeIpGroupsResponse;
import software.amazon.awssdk.services.workspaces.model.DescribeTagsRequest;
import software.amazon.awssdk.services.workspaces.model.DescribeTagsResponse;
import software.amazon.awssdk.services.workspaces.model.DescribeWorkspaceAssociationsRequest;
import software.amazon.awssdk.services.workspaces.model.DescribeWorkspaceAssociationsResponse;
import software.amazon.awssdk.services.workspaces.model.DescribeWorkspaceBundlesRequest;
import software.amazon.awssdk.services.workspaces.model.DescribeWorkspaceBundlesResponse;
import software.amazon.awssdk.services.workspaces.model.DescribeWorkspaceDirectoriesRequest;
import software.amazon.awssdk.services.workspaces.model.DescribeWorkspaceDirectoriesResponse;
import software.amazon.awssdk.services.workspaces.model.DescribeWorkspaceImagePermissionsRequest;
import software.amazon.awssdk.services.workspaces.model.DescribeWorkspaceImagePermissionsResponse;
import software.amazon.awssdk.services.workspaces.model.DescribeWorkspaceImagesRequest;
import software.amazon.awssdk.services.workspaces.model.DescribeWorkspaceImagesResponse;
import software.amazon.awssdk.services.workspaces.model.DescribeWorkspaceSnapshotsRequest;
import software.amazon.awssdk.services.workspaces.model.DescribeWorkspaceSnapshotsResponse;
import software.amazon.awssdk.services.workspaces.model.DescribeWorkspacesConnectionStatusRequest;
import software.amazon.awssdk.services.workspaces.model.DescribeWorkspacesConnectionStatusResponse;
import software.amazon.awssdk.services.workspaces.model.DescribeWorkspacesPoolSessionsRequest;
import software.amazon.awssdk.services.workspaces.model.DescribeWorkspacesPoolSessionsResponse;
import software.amazon.awssdk.services.workspaces.model.DescribeWorkspacesPoolsRequest;
import software.amazon.awssdk.services.workspaces.model.DescribeWorkspacesPoolsResponse;
import software.amazon.awssdk.services.workspaces.model.DescribeWorkspacesRequest;
import software.amazon.awssdk.services.workspaces.model.DescribeWorkspacesResponse;
import software.amazon.awssdk.services.workspaces.model.DisassociateConnectionAliasRequest;
import software.amazon.awssdk.services.workspaces.model.DisassociateConnectionAliasResponse;
import software.amazon.awssdk.services.workspaces.model.DisassociateIpGroupsRequest;
import software.amazon.awssdk.services.workspaces.model.DisassociateIpGroupsResponse;
import software.amazon.awssdk.services.workspaces.model.DisassociateWorkspaceApplicationRequest;
import software.amazon.awssdk.services.workspaces.model.DisassociateWorkspaceApplicationResponse;
import software.amazon.awssdk.services.workspaces.model.GetAccountLinkRequest;
import software.amazon.awssdk.services.workspaces.model.GetAccountLinkResponse;
import software.amazon.awssdk.services.workspaces.model.ImportClientBrandingRequest;
import software.amazon.awssdk.services.workspaces.model.ImportClientBrandingResponse;
import software.amazon.awssdk.services.workspaces.model.ImportWorkspaceImageRequest;
import software.amazon.awssdk.services.workspaces.model.ImportWorkspaceImageResponse;
import software.amazon.awssdk.services.workspaces.model.IncompatibleApplicationsException;
import software.amazon.awssdk.services.workspaces.model.InternalServerException;
import software.amazon.awssdk.services.workspaces.model.InvalidParameterValuesException;
import software.amazon.awssdk.services.workspaces.model.InvalidResourceStateException;
import software.amazon.awssdk.services.workspaces.model.ListAccountLinksRequest;
import software.amazon.awssdk.services.workspaces.model.ListAccountLinksResponse;
import software.amazon.awssdk.services.workspaces.model.ListAvailableManagementCidrRangesRequest;
import software.amazon.awssdk.services.workspaces.model.ListAvailableManagementCidrRangesResponse;
import software.amazon.awssdk.services.workspaces.model.MigrateWorkspaceRequest;
import software.amazon.awssdk.services.workspaces.model.MigrateWorkspaceResponse;
import software.amazon.awssdk.services.workspaces.model.ModifyAccountRequest;
import software.amazon.awssdk.services.workspaces.model.ModifyAccountResponse;
import software.amazon.awssdk.services.workspaces.model.ModifyCertificateBasedAuthPropertiesRequest;
import software.amazon.awssdk.services.workspaces.model.ModifyCertificateBasedAuthPropertiesResponse;
import software.amazon.awssdk.services.workspaces.model.ModifyClientPropertiesRequest;
import software.amazon.awssdk.services.workspaces.model.ModifyClientPropertiesResponse;
import software.amazon.awssdk.services.workspaces.model.ModifySamlPropertiesRequest;
import software.amazon.awssdk.services.workspaces.model.ModifySamlPropertiesResponse;
import software.amazon.awssdk.services.workspaces.model.ModifySelfservicePermissionsRequest;
import software.amazon.awssdk.services.workspaces.model.ModifySelfservicePermissionsResponse;
import software.amazon.awssdk.services.workspaces.model.ModifyStreamingPropertiesRequest;
import software.amazon.awssdk.services.workspaces.model.ModifyStreamingPropertiesResponse;
import software.amazon.awssdk.services.workspaces.model.ModifyWorkspaceAccessPropertiesRequest;
import software.amazon.awssdk.services.workspaces.model.ModifyWorkspaceAccessPropertiesResponse;
import software.amazon.awssdk.services.workspaces.model.ModifyWorkspaceCreationPropertiesRequest;
import software.amazon.awssdk.services.workspaces.model.ModifyWorkspaceCreationPropertiesResponse;
import software.amazon.awssdk.services.workspaces.model.ModifyWorkspacePropertiesRequest;
import software.amazon.awssdk.services.workspaces.model.ModifyWorkspacePropertiesResponse;
import software.amazon.awssdk.services.workspaces.model.ModifyWorkspaceStateRequest;
import software.amazon.awssdk.services.workspaces.model.ModifyWorkspaceStateResponse;
import software.amazon.awssdk.services.workspaces.model.OperatingSystemNotCompatibleException;
import software.amazon.awssdk.services.workspaces.model.OperationInProgressException;
import software.amazon.awssdk.services.workspaces.model.OperationNotSupportedException;
import software.amazon.awssdk.services.workspaces.model.RebootWorkspacesRequest;
import software.amazon.awssdk.services.workspaces.model.RebootWorkspacesResponse;
import software.amazon.awssdk.services.workspaces.model.RebuildWorkspacesRequest;
import software.amazon.awssdk.services.workspaces.model.RebuildWorkspacesResponse;
import software.amazon.awssdk.services.workspaces.model.RegisterWorkspaceDirectoryRequest;
import software.amazon.awssdk.services.workspaces.model.RegisterWorkspaceDirectoryResponse;
import software.amazon.awssdk.services.workspaces.model.RejectAccountLinkInvitationRequest;
import software.amazon.awssdk.services.workspaces.model.RejectAccountLinkInvitationResponse;
import software.amazon.awssdk.services.workspaces.model.ResourceAlreadyExistsException;
import software.amazon.awssdk.services.workspaces.model.ResourceAssociatedException;
import software.amazon.awssdk.services.workspaces.model.ResourceCreationFailedException;
import software.amazon.awssdk.services.workspaces.model.ResourceInUseException;
import software.amazon.awssdk.services.workspaces.model.ResourceLimitExceededException;
import software.amazon.awssdk.services.workspaces.model.ResourceNotFoundException;
import software.amazon.awssdk.services.workspaces.model.ResourceUnavailableException;
import software.amazon.awssdk.services.workspaces.model.RestoreWorkspaceRequest;
import software.amazon.awssdk.services.workspaces.model.RestoreWorkspaceResponse;
import software.amazon.awssdk.services.workspaces.model.RevokeIpRulesRequest;
import software.amazon.awssdk.services.workspaces.model.RevokeIpRulesResponse;
import software.amazon.awssdk.services.workspaces.model.StartWorkspacesPoolRequest;
import software.amazon.awssdk.services.workspaces.model.StartWorkspacesPoolResponse;
import software.amazon.awssdk.services.workspaces.model.StartWorkspacesRequest;
import software.amazon.awssdk.services.workspaces.model.StartWorkspacesResponse;
import software.amazon.awssdk.services.workspaces.model.StopWorkspacesPoolRequest;
import software.amazon.awssdk.services.workspaces.model.StopWorkspacesPoolResponse;
import software.amazon.awssdk.services.workspaces.model.StopWorkspacesRequest;
import software.amazon.awssdk.services.workspaces.model.StopWorkspacesResponse;
import software.amazon.awssdk.services.workspaces.model.TerminateWorkspacesPoolRequest;
import software.amazon.awssdk.services.workspaces.model.TerminateWorkspacesPoolResponse;
import software.amazon.awssdk.services.workspaces.model.TerminateWorkspacesPoolSessionRequest;
import software.amazon.awssdk.services.workspaces.model.TerminateWorkspacesPoolSessionResponse;
import software.amazon.awssdk.services.workspaces.model.TerminateWorkspacesRequest;
import software.amazon.awssdk.services.workspaces.model.TerminateWorkspacesResponse;
import software.amazon.awssdk.services.workspaces.model.UnsupportedNetworkConfigurationException;
import software.amazon.awssdk.services.workspaces.model.UnsupportedWorkspaceConfigurationException;
import software.amazon.awssdk.services.workspaces.model.UpdateConnectClientAddInRequest;
import software.amazon.awssdk.services.workspaces.model.UpdateConnectClientAddInResponse;
import software.amazon.awssdk.services.workspaces.model.UpdateConnectionAliasPermissionRequest;
import software.amazon.awssdk.services.workspaces.model.UpdateConnectionAliasPermissionResponse;
import software.amazon.awssdk.services.workspaces.model.UpdateRulesOfIpGroupRequest;
import software.amazon.awssdk.services.workspaces.model.UpdateRulesOfIpGroupResponse;
import software.amazon.awssdk.services.workspaces.model.UpdateWorkspaceBundleRequest;
import software.amazon.awssdk.services.workspaces.model.UpdateWorkspaceBundleResponse;
import software.amazon.awssdk.services.workspaces.model.UpdateWorkspaceImagePermissionRequest;
import software.amazon.awssdk.services.workspaces.model.UpdateWorkspaceImagePermissionResponse;
import software.amazon.awssdk.services.workspaces.model.UpdateWorkspacesPoolRequest;
import software.amazon.awssdk.services.workspaces.model.UpdateWorkspacesPoolResponse;
import software.amazon.awssdk.services.workspaces.model.ValidationException;
import software.amazon.awssdk.services.workspaces.model.WorkSpacesException;
import software.amazon.awssdk.services.workspaces.model.WorkspacesDefaultRoleNotFoundException;
import software.amazon.awssdk.services.workspaces.transform.AcceptAccountLinkInvitationRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.AssociateConnectionAliasRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.AssociateIpGroupsRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.AssociateWorkspaceApplicationRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.AuthorizeIpRulesRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.CopyWorkspaceImageRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.CreateAccountLinkInvitationRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.CreateConnectClientAddInRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.CreateConnectionAliasRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.CreateIpGroupRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.CreateStandbyWorkspacesRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.CreateTagsRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.CreateUpdatedWorkspaceImageRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.CreateWorkspaceBundleRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.CreateWorkspaceImageRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.CreateWorkspacesPoolRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.CreateWorkspacesRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.DeleteAccountLinkInvitationRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.DeleteClientBrandingRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.DeleteConnectClientAddInRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.DeleteConnectionAliasRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.DeleteIpGroupRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.DeleteTagsRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.DeleteWorkspaceBundleRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.DeleteWorkspaceImageRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.DeployWorkspaceApplicationsRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.DeregisterWorkspaceDirectoryRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.DescribeAccountModificationsRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.DescribeAccountRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.DescribeApplicationAssociationsRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.DescribeApplicationsRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.DescribeBundleAssociationsRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.DescribeClientBrandingRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.DescribeClientPropertiesRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.DescribeConnectClientAddInsRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.DescribeConnectionAliasPermissionsRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.DescribeConnectionAliasesRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.DescribeImageAssociationsRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.DescribeIpGroupsRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.DescribeTagsRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.DescribeWorkspaceAssociationsRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.DescribeWorkspaceBundlesRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.DescribeWorkspaceDirectoriesRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.DescribeWorkspaceImagePermissionsRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.DescribeWorkspaceImagesRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.DescribeWorkspaceSnapshotsRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.DescribeWorkspacesConnectionStatusRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.DescribeWorkspacesPoolSessionsRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.DescribeWorkspacesPoolsRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.DescribeWorkspacesRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.DisassociateConnectionAliasRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.DisassociateIpGroupsRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.DisassociateWorkspaceApplicationRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.GetAccountLinkRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.ImportClientBrandingRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.ImportWorkspaceImageRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.ListAccountLinksRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.ListAvailableManagementCidrRangesRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.MigrateWorkspaceRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.ModifyAccountRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.ModifyCertificateBasedAuthPropertiesRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.ModifyClientPropertiesRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.ModifySamlPropertiesRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.ModifySelfservicePermissionsRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.ModifyStreamingPropertiesRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.ModifyWorkspaceAccessPropertiesRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.ModifyWorkspaceCreationPropertiesRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.ModifyWorkspacePropertiesRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.ModifyWorkspaceStateRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.RebootWorkspacesRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.RebuildWorkspacesRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.RegisterWorkspaceDirectoryRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.RejectAccountLinkInvitationRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.RestoreWorkspaceRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.RevokeIpRulesRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.StartWorkspacesPoolRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.StartWorkspacesRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.StopWorkspacesPoolRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.StopWorkspacesRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.TerminateWorkspacesPoolRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.TerminateWorkspacesPoolSessionRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.TerminateWorkspacesRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.UpdateConnectClientAddInRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.UpdateConnectionAliasPermissionRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.UpdateRulesOfIpGroupRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.UpdateWorkspaceBundleRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.UpdateWorkspaceImagePermissionRequestMarshaller;
import software.amazon.awssdk.services.workspaces.transform.UpdateWorkspacesPoolRequestMarshaller;
import software.amazon.awssdk.utils.Logger;
/**
* Internal implementation of {@link WorkSpacesClient}.
*
* @see WorkSpacesClient#builder()
*/
@Generated("software.amazon.awssdk:codegen")
@SdkInternalApi
final class DefaultWorkSpacesClient implements WorkSpacesClient {
private static final Logger log = Logger.loggerFor(DefaultWorkSpacesClient.class);
private static final AwsProtocolMetadata protocolMetadata = AwsProtocolMetadata.builder()
.serviceProtocol(AwsServiceProtocol.AWS_JSON).build();
private final SyncClientHandler clientHandler;
private final AwsJsonProtocolFactory protocolFactory;
private final SdkClientConfiguration clientConfiguration;
protected DefaultWorkSpacesClient(SdkClientConfiguration clientConfiguration) {
this.clientHandler = new AwsSyncClientHandler(clientConfiguration);
this.clientConfiguration = clientConfiguration.toBuilder().option(SdkClientOption.SDK_CLIENT, this).build();
this.protocolFactory = init(AwsJsonProtocolFactory.builder()).build();
}
/**
*
* Accepts the account link invitation.
*
*
*
* There's currently no unlinking capability after you accept the account linking invitation.
*
*
*
* @param acceptAccountLinkInvitationRequest
* @return Result of the AcceptAccountLinkInvitation operation returned by the service.
* @throws ValidationException
* You either haven't provided a TargetAccountId
or are using the same value for
* TargetAccountId
and SourceAccountId
.
* @throws ResourceNotFoundException
* The resource could not be found.
* @throws AccessDeniedException
* The user is not authorized to access a resource.
* @throws ConflictException
* The TargetAccountId
is already linked or invited.
* @throws InternalServerException
* Unexpected server error occured.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws WorkSpacesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample WorkSpacesClient.AcceptAccountLinkInvitation
* @see AWS API Documentation
*/
@Override
public AcceptAccountLinkInvitationResponse acceptAccountLinkInvitation(
AcceptAccountLinkInvitationRequest acceptAccountLinkInvitationRequest) throws ValidationException,
ResourceNotFoundException, AccessDeniedException, ConflictException, InternalServerException, AwsServiceException,
SdkClientException, WorkSpacesException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, AcceptAccountLinkInvitationResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(acceptAccountLinkInvitationRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, acceptAccountLinkInvitationRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "WorkSpaces");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "AcceptAccountLinkInvitation");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("AcceptAccountLinkInvitation").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(acceptAccountLinkInvitationRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new AcceptAccountLinkInvitationRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Associates the specified connection alias with the specified directory to enable cross-Region redirection. For
* more information, see Cross-Region
* Redirection for Amazon WorkSpaces.
*
*
*
* Before performing this operation, call
* DescribeConnectionAliases to make sure that the current state of the connection alias is CREATED
* .
*
*
*
* @param associateConnectionAliasRequest
* @return Result of the AssociateConnectionAlias operation returned by the service.
* @throws ResourceAssociatedException
* The resource is associated with a directory.
* @throws AccessDeniedException
* The user is not authorized to access a resource.
* @throws ResourceNotFoundException
* The resource could not be found.
* @throws InvalidParameterValuesException
* One or more parameter values are not valid.
* @throws InvalidResourceStateException
* The state of the resource is not valid for this operation.
* @throws OperationNotSupportedException
* This operation is not supported.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws WorkSpacesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample WorkSpacesClient.AssociateConnectionAlias
* @see AWS API Documentation
*/
@Override
public AssociateConnectionAliasResponse associateConnectionAlias(
AssociateConnectionAliasRequest associateConnectionAliasRequest) throws ResourceAssociatedException,
AccessDeniedException, ResourceNotFoundException, InvalidParameterValuesException, InvalidResourceStateException,
OperationNotSupportedException, AwsServiceException, SdkClientException, WorkSpacesException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, AssociateConnectionAliasResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(associateConnectionAliasRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, associateConnectionAliasRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "WorkSpaces");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "AssociateConnectionAlias");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("AssociateConnectionAlias").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(associateConnectionAliasRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new AssociateConnectionAliasRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Associates the specified IP access control group with the specified directory.
*
*
* @param associateIpGroupsRequest
* @return Result of the AssociateIpGroups operation returned by the service.
* @throws InvalidParameterValuesException
* One or more parameter values are not valid.
* @throws ResourceNotFoundException
* The resource could not be found.
* @throws ResourceLimitExceededException
* Your resource limits have been exceeded.
* @throws InvalidResourceStateException
* The state of the resource is not valid for this operation.
* @throws AccessDeniedException
* The user is not authorized to access a resource.
* @throws OperationNotSupportedException
* This operation is not supported.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws WorkSpacesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample WorkSpacesClient.AssociateIpGroups
* @see AWS
* API Documentation
*/
@Override
public AssociateIpGroupsResponse associateIpGroups(AssociateIpGroupsRequest associateIpGroupsRequest)
throws InvalidParameterValuesException, ResourceNotFoundException, ResourceLimitExceededException,
InvalidResourceStateException, AccessDeniedException, OperationNotSupportedException, AwsServiceException,
SdkClientException, WorkSpacesException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
AssociateIpGroupsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(associateIpGroupsRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, associateIpGroupsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "WorkSpaces");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "AssociateIpGroups");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("AssociateIpGroups").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(associateIpGroupsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new AssociateIpGroupsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Associates the specified application to the specified WorkSpace.
*
*
* @param associateWorkspaceApplicationRequest
* @return Result of the AssociateWorkspaceApplication operation returned by the service.
* @throws AccessDeniedException
* The user is not authorized to access a resource.
* @throws InvalidParameterValuesException
* One or more parameter values are not valid.
* @throws OperationNotSupportedException
* This operation is not supported.
* @throws ResourceAlreadyExistsException
* The specified resource already exists.
* @throws ResourceInUseException
* The specified resource is currently in use.
* @throws ResourceNotFoundException
* The resource could not be found.
* @throws ComputeNotCompatibleException
* The compute type of the WorkSpace is not compatible with the application.
* @throws OperatingSystemNotCompatibleException
* The operating system of the WorkSpace is not compatible with the application.
* @throws ApplicationNotSupportedException
* The specified application is not supported.
* @throws IncompatibleApplicationsException
* The specified application is not compatible with the resource.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws WorkSpacesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample WorkSpacesClient.AssociateWorkspaceApplication
* @see AWS API Documentation
*/
@Override
public AssociateWorkspaceApplicationResponse associateWorkspaceApplication(
AssociateWorkspaceApplicationRequest associateWorkspaceApplicationRequest) throws AccessDeniedException,
InvalidParameterValuesException, OperationNotSupportedException, ResourceAlreadyExistsException,
ResourceInUseException, ResourceNotFoundException, ComputeNotCompatibleException,
OperatingSystemNotCompatibleException, ApplicationNotSupportedException, IncompatibleApplicationsException,
AwsServiceException, SdkClientException, WorkSpacesException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, AssociateWorkspaceApplicationResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(associateWorkspaceApplicationRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
associateWorkspaceApplicationRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "WorkSpaces");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "AssociateWorkspaceApplication");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("AssociateWorkspaceApplication").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(associateWorkspaceApplicationRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new AssociateWorkspaceApplicationRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Adds one or more rules to the specified IP access control group.
*
*
* This action gives users permission to access their WorkSpaces from the CIDR address ranges specified in the
* rules.
*
*
* @param authorizeIpRulesRequest
* @return Result of the AuthorizeIpRules operation returned by the service.
* @throws InvalidParameterValuesException
* One or more parameter values are not valid.
* @throws ResourceNotFoundException
* The resource could not be found.
* @throws ResourceLimitExceededException
* Your resource limits have been exceeded.
* @throws InvalidResourceStateException
* The state of the resource is not valid for this operation.
* @throws AccessDeniedException
* The user is not authorized to access a resource.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws WorkSpacesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample WorkSpacesClient.AuthorizeIpRules
* @see AWS
* API Documentation
*/
@Override
public AuthorizeIpRulesResponse authorizeIpRules(AuthorizeIpRulesRequest authorizeIpRulesRequest)
throws InvalidParameterValuesException, ResourceNotFoundException, ResourceLimitExceededException,
InvalidResourceStateException, AccessDeniedException, AwsServiceException, SdkClientException, WorkSpacesException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
AuthorizeIpRulesResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(authorizeIpRulesRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, authorizeIpRulesRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "WorkSpaces");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "AuthorizeIpRules");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("AuthorizeIpRules").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(authorizeIpRulesRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new AuthorizeIpRulesRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Copies the specified image from the specified Region to the current Region. For more information about copying
* images, see Copy a
* Custom WorkSpaces Image.
*
*
* In the China (Ningxia) Region, you can copy images only within the same Region.
*
*
* In Amazon Web Services GovCloud (US), to copy images to and from other Regions, contact Amazon Web Services
* Support.
*
*
*
* Before copying a shared image, be sure to verify that it has been shared from the correct Amazon Web Services
* account. To determine if an image has been shared and to see the ID of the Amazon Web Services account that owns
* an image, use the
* DescribeWorkSpaceImages and DescribeWorkspaceImagePermissions API operations.
*
*
*
* @param copyWorkspaceImageRequest
* @return Result of the CopyWorkspaceImage operation returned by the service.
* @throws ResourceLimitExceededException
* Your resource limits have been exceeded.
* @throws ResourceAlreadyExistsException
* The specified resource already exists.
* @throws ResourceNotFoundException
* The resource could not be found.
* @throws ResourceUnavailableException
* The specified resource is not available.
* @throws OperationNotSupportedException
* This operation is not supported.
* @throws AccessDeniedException
* The user is not authorized to access a resource.
* @throws InvalidParameterValuesException
* One or more parameter values are not valid.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws WorkSpacesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample WorkSpacesClient.CopyWorkspaceImage
* @see AWS
* API Documentation
*/
@Override
public CopyWorkspaceImageResponse copyWorkspaceImage(CopyWorkspaceImageRequest copyWorkspaceImageRequest)
throws ResourceLimitExceededException, ResourceAlreadyExistsException, ResourceNotFoundException,
ResourceUnavailableException, OperationNotSupportedException, AccessDeniedException, InvalidParameterValuesException,
AwsServiceException, SdkClientException, WorkSpacesException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, CopyWorkspaceImageResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(copyWorkspaceImageRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, copyWorkspaceImageRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "WorkSpaces");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CopyWorkspaceImage");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CopyWorkspaceImage").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(copyWorkspaceImageRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CopyWorkspaceImageRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Creates the account link invitation.
*
*
* @param createAccountLinkInvitationRequest
* @return Result of the CreateAccountLinkInvitation operation returned by the service.
* @throws ValidationException
* You either haven't provided a TargetAccountId
or are using the same value for
* TargetAccountId
and SourceAccountId
.
* @throws AccessDeniedException
* The user is not authorized to access a resource.
* @throws ConflictException
* The TargetAccountId
is already linked or invited.
* @throws InternalServerException
* Unexpected server error occured.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws WorkSpacesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample WorkSpacesClient.CreateAccountLinkInvitation
* @see AWS API Documentation
*/
@Override
public CreateAccountLinkInvitationResponse createAccountLinkInvitation(
CreateAccountLinkInvitationRequest createAccountLinkInvitationRequest) throws ValidationException,
AccessDeniedException, ConflictException, InternalServerException, AwsServiceException, SdkClientException,
WorkSpacesException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, CreateAccountLinkInvitationResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createAccountLinkInvitationRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createAccountLinkInvitationRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "WorkSpaces");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateAccountLinkInvitation");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CreateAccountLinkInvitation").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(createAccountLinkInvitationRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateAccountLinkInvitationRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Creates a client-add-in for Amazon Connect within a directory. You can create only one Amazon Connect client
* add-in within a directory.
*
*
* This client add-in allows WorkSpaces users to seamlessly connect to Amazon Connect.
*
*
* @param createConnectClientAddInRequest
* @return Result of the CreateConnectClientAddIn operation returned by the service.
* @throws InvalidParameterValuesException
* One or more parameter values are not valid.
* @throws ResourceNotFoundException
* The resource could not be found.
* @throws ResourceCreationFailedException
* The resource could not be created.
* @throws ResourceAlreadyExistsException
* The specified resource already exists.
* @throws AccessDeniedException
* The user is not authorized to access a resource.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws WorkSpacesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample WorkSpacesClient.CreateConnectClientAddIn
* @see AWS API Documentation
*/
@Override
public CreateConnectClientAddInResponse createConnectClientAddIn(
CreateConnectClientAddInRequest createConnectClientAddInRequest) throws InvalidParameterValuesException,
ResourceNotFoundException, ResourceCreationFailedException, ResourceAlreadyExistsException, AccessDeniedException,
AwsServiceException, SdkClientException, WorkSpacesException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, CreateConnectClientAddInResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createConnectClientAddInRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createConnectClientAddInRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "WorkSpaces");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateConnectClientAddIn");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CreateConnectClientAddIn").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(createConnectClientAddInRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateConnectClientAddInRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Creates the specified connection alias for use with cross-Region redirection. For more information, see Cross-Region
* Redirection for Amazon WorkSpaces.
*
*
* @param createConnectionAliasRequest
* @return Result of the CreateConnectionAlias operation returned by the service.
* @throws ResourceAlreadyExistsException
* The specified resource already exists.
* @throws AccessDeniedException
* The user is not authorized to access a resource.
* @throws InvalidParameterValuesException
* One or more parameter values are not valid.
* @throws ResourceLimitExceededException
* Your resource limits have been exceeded.
* @throws InvalidResourceStateException
* The state of the resource is not valid for this operation.
* @throws OperationNotSupportedException
* This operation is not supported.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws WorkSpacesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample WorkSpacesClient.CreateConnectionAlias
* @see AWS API Documentation
*/
@Override
public CreateConnectionAliasResponse createConnectionAlias(CreateConnectionAliasRequest createConnectionAliasRequest)
throws ResourceAlreadyExistsException, AccessDeniedException, InvalidParameterValuesException,
ResourceLimitExceededException, InvalidResourceStateException, OperationNotSupportedException, AwsServiceException,
SdkClientException, WorkSpacesException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, CreateConnectionAliasResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createConnectionAliasRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createConnectionAliasRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "WorkSpaces");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateConnectionAlias");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreateConnectionAlias").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(createConnectionAliasRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateConnectionAliasRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Creates an IP access control group.
*
*
* An IP access control group provides you with the ability to control the IP addresses from which users are allowed
* to access their WorkSpaces. To specify the CIDR address ranges, add rules to your IP access control group and
* then associate the group with your directory. You can add rules when you create the group or at any time using
* AuthorizeIpRules.
*
*
* There is a default IP access control group associated with your directory. If you don't associate an IP access
* control group with your directory, the default group is used. The default group includes a default rule that
* allows users to access their WorkSpaces from anywhere. You cannot modify the default IP access control group for
* your directory.
*
*
* @param createIpGroupRequest
* @return Result of the CreateIpGroup operation returned by the service.
* @throws InvalidParameterValuesException
* One or more parameter values are not valid.
* @throws ResourceLimitExceededException
* Your resource limits have been exceeded.
* @throws ResourceAlreadyExistsException
* The specified resource already exists.
* @throws ResourceCreationFailedException
* The resource could not be created.
* @throws AccessDeniedException
* The user is not authorized to access a resource.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws WorkSpacesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample WorkSpacesClient.CreateIpGroup
* @see AWS API
* Documentation
*/
@Override
public CreateIpGroupResponse createIpGroup(CreateIpGroupRequest createIpGroupRequest) throws InvalidParameterValuesException,
ResourceLimitExceededException, ResourceAlreadyExistsException, ResourceCreationFailedException,
AccessDeniedException, AwsServiceException, SdkClientException, WorkSpacesException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
CreateIpGroupResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createIpGroupRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createIpGroupRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "WorkSpaces");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateIpGroup");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreateIpGroup").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(createIpGroupRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateIpGroupRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Creates a standby WorkSpace in a secondary Region.
*
*
* @param createStandbyWorkspacesRequest
* @return Result of the CreateStandbyWorkspaces operation returned by the service.
* @throws AccessDeniedException
* The user is not authorized to access a resource.
* @throws InvalidParameterValuesException
* One or more parameter values are not valid.
* @throws OperationNotSupportedException
* This operation is not supported.
* @throws ResourceNotFoundException
* The resource could not be found.
* @throws ResourceLimitExceededException
* Your resource limits have been exceeded.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws WorkSpacesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample WorkSpacesClient.CreateStandbyWorkspaces
* @see AWS API Documentation
*/
@Override
public CreateStandbyWorkspacesResponse createStandbyWorkspaces(CreateStandbyWorkspacesRequest createStandbyWorkspacesRequest)
throws AccessDeniedException, InvalidParameterValuesException, OperationNotSupportedException,
ResourceNotFoundException, ResourceLimitExceededException, AwsServiceException, SdkClientException,
WorkSpacesException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, CreateStandbyWorkspacesResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createStandbyWorkspacesRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createStandbyWorkspacesRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "WorkSpaces");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateStandbyWorkspaces");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CreateStandbyWorkspaces").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(createStandbyWorkspacesRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateStandbyWorkspacesRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Creates the specified tags for the specified WorkSpaces resource.
*
*
* @param createTagsRequest
* @return Result of the CreateTags operation returned by the service.
* @throws ResourceNotFoundException
* The resource could not be found.
* @throws InvalidParameterValuesException
* One or more parameter values are not valid.
* @throws ResourceLimitExceededException
* Your resource limits have been exceeded.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws WorkSpacesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample WorkSpacesClient.CreateTags
* @see AWS API
* Documentation
*/
@Override
public CreateTagsResponse createTags(CreateTagsRequest createTagsRequest) throws ResourceNotFoundException,
InvalidParameterValuesException, ResourceLimitExceededException, AwsServiceException, SdkClientException,
WorkSpacesException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
CreateTagsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createTagsRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createTagsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "WorkSpaces");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateTags");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreateTags").withProtocolMetadata(protocolMetadata).withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withRequestConfiguration(clientConfiguration)
.withInput(createTagsRequest).withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateTagsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Creates a new updated WorkSpace image based on the specified source image. The new updated WorkSpace image has
* the latest drivers and other updates required by the Amazon WorkSpaces components.
*
*
* To determine which WorkSpace images need to be updated with the latest Amazon WorkSpaces requirements, use
* DescribeWorkspaceImages.
*
*
*
* -
*
* Only Windows 10, Windows Server 2016, and Windows Server 2019 WorkSpace images can be programmatically updated at
* this time.
*
*
* -
*
* Microsoft Windows updates and other application updates are not included in the update process.
*
*
* -
*
* The source WorkSpace image is not deleted. You can delete the source image after you've verified your new updated
* image and created a new bundle.
*
*
*
*
*
* @param createUpdatedWorkspaceImageRequest
* @return Result of the CreateUpdatedWorkspaceImage operation returned by the service.
* @throws ResourceLimitExceededException
* Your resource limits have been exceeded.
* @throws ResourceAlreadyExistsException
* The specified resource already exists.
* @throws ResourceNotFoundException
* The resource could not be found.
* @throws OperationNotSupportedException
* This operation is not supported.
* @throws InvalidResourceStateException
* The state of the resource is not valid for this operation.
* @throws AccessDeniedException
* The user is not authorized to access a resource.
* @throws InvalidParameterValuesException
* One or more parameter values are not valid.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws WorkSpacesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample WorkSpacesClient.CreateUpdatedWorkspaceImage
* @see AWS API Documentation
*/
@Override
public CreateUpdatedWorkspaceImageResponse createUpdatedWorkspaceImage(
CreateUpdatedWorkspaceImageRequest createUpdatedWorkspaceImageRequest) throws ResourceLimitExceededException,
ResourceAlreadyExistsException, ResourceNotFoundException, OperationNotSupportedException,
InvalidResourceStateException, AccessDeniedException, InvalidParameterValuesException, AwsServiceException,
SdkClientException, WorkSpacesException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, CreateUpdatedWorkspaceImageResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createUpdatedWorkspaceImageRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createUpdatedWorkspaceImageRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "WorkSpaces");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateUpdatedWorkspaceImage");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("CreateUpdatedWorkspaceImage").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(createUpdatedWorkspaceImageRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateUpdatedWorkspaceImageRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Creates the specified WorkSpace bundle. For more information about creating WorkSpace bundles, see Create a Custom
* WorkSpaces Image and Bundle.
*
*
* @param createWorkspaceBundleRequest
* @return Result of the CreateWorkspaceBundle operation returned by the service.
* @throws ResourceUnavailableException
* The specified resource is not available.
* @throws ResourceAlreadyExistsException
* The specified resource already exists.
* @throws ResourceLimitExceededException
* Your resource limits have been exceeded.
* @throws InvalidParameterValuesException
* One or more parameter values are not valid.
* @throws ResourceNotFoundException
* The resource could not be found.
* @throws AccessDeniedException
* The user is not authorized to access a resource.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws WorkSpacesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample WorkSpacesClient.CreateWorkspaceBundle
* @see AWS API Documentation
*/
@Override
public CreateWorkspaceBundleResponse createWorkspaceBundle(CreateWorkspaceBundleRequest createWorkspaceBundleRequest)
throws ResourceUnavailableException, ResourceAlreadyExistsException, ResourceLimitExceededException,
InvalidParameterValuesException, ResourceNotFoundException, AccessDeniedException, AwsServiceException,
SdkClientException, WorkSpacesException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, CreateWorkspaceBundleResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createWorkspaceBundleRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createWorkspaceBundleRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "WorkSpaces");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateWorkspaceBundle");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreateWorkspaceBundle").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(createWorkspaceBundleRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateWorkspaceBundleRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Creates a new WorkSpace image from an existing WorkSpace.
*
*
* @param createWorkspaceImageRequest
* @return Result of the CreateWorkspaceImage operation returned by the service.
* @throws ResourceLimitExceededException
* Your resource limits have been exceeded.
* @throws ResourceAlreadyExistsException
* The specified resource already exists.
* @throws ResourceNotFoundException
* The resource could not be found.
* @throws OperationNotSupportedException
* This operation is not supported.
* @throws InvalidResourceStateException
* The state of the resource is not valid for this operation.
* @throws AccessDeniedException
* The user is not authorized to access a resource.
* @throws InvalidParameterValuesException
* One or more parameter values are not valid.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws WorkSpacesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample WorkSpacesClient.CreateWorkspaceImage
* @see AWS API Documentation
*/
@Override
public CreateWorkspaceImageResponse createWorkspaceImage(CreateWorkspaceImageRequest createWorkspaceImageRequest)
throws ResourceLimitExceededException, ResourceAlreadyExistsException, ResourceNotFoundException,
OperationNotSupportedException, InvalidResourceStateException, AccessDeniedException,
InvalidParameterValuesException, AwsServiceException, SdkClientException, WorkSpacesException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, CreateWorkspaceImageResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createWorkspaceImageRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createWorkspaceImageRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "WorkSpaces");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateWorkspaceImage");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreateWorkspaceImage").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(createWorkspaceImageRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateWorkspaceImageRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Creates one or more WorkSpaces.
*
*
* This operation is asynchronous and returns before the WorkSpaces are created.
*
*
*
* -
*
* The MANUAL
running mode value is only supported by Amazon WorkSpaces Core. Contact your account team
* to be allow-listed to use this value. For more information, see Amazon WorkSpaces Core.
*
*
* -
*
* You don't need to specify the PCOIP
protocol for Linux bundles because WSP
is the
* default protocol for those bundles.
*
*
* -
*
* User-decoupled WorkSpaces are only supported by Amazon WorkSpaces Core.
*
*
* -
*
* Review your running mode to ensure you are using one that is optimal for your needs and budget. For more
* information on switching running modes, see Can I switch between hourly and monthly billing?
*
*
*
*
*
* @param createWorkspacesRequest
* @return Result of the CreateWorkspaces operation returned by the service.
* @throws ResourceLimitExceededException
* Your resource limits have been exceeded.
* @throws InvalidParameterValuesException
* One or more parameter values are not valid.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws WorkSpacesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample WorkSpacesClient.CreateWorkspaces
* @see AWS
* API Documentation
*/
@Override
public CreateWorkspacesResponse createWorkspaces(CreateWorkspacesRequest createWorkspacesRequest)
throws ResourceLimitExceededException, InvalidParameterValuesException, AwsServiceException, SdkClientException,
WorkSpacesException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
CreateWorkspacesResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createWorkspacesRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createWorkspacesRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "WorkSpaces");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateWorkspaces");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreateWorkspaces").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(createWorkspacesRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateWorkspacesRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Creates a pool of WorkSpaces.
*
*
* @param createWorkspacesPoolRequest
* @return Result of the CreateWorkspacesPool operation returned by the service.
* @throws ResourceLimitExceededException
* Your resource limits have been exceeded.
* @throws ResourceNotFoundException
* The resource could not be found.
* @throws InvalidParameterValuesException
* One or more parameter values are not valid.
* @throws ResourceAlreadyExistsException
* The specified resource already exists.
* @throws OperationNotSupportedException
* This operation is not supported.
* @throws AccessDeniedException
* The user is not authorized to access a resource.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws WorkSpacesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample WorkSpacesClient.CreateWorkspacesPool
* @see AWS API Documentation
*/
@Override
public CreateWorkspacesPoolResponse createWorkspacesPool(CreateWorkspacesPoolRequest createWorkspacesPoolRequest)
throws ResourceLimitExceededException, ResourceNotFoundException, InvalidParameterValuesException,
ResourceAlreadyExistsException, OperationNotSupportedException, AccessDeniedException, AwsServiceException,
SdkClientException, WorkSpacesException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, CreateWorkspacesPoolResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(createWorkspacesPoolRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, createWorkspacesPoolRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "WorkSpaces");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateWorkspacesPool");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("CreateWorkspacesPool").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(createWorkspacesPoolRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new CreateWorkspacesPoolRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Deletes the account link invitation.
*
*
* @param deleteAccountLinkInvitationRequest
* @return Result of the DeleteAccountLinkInvitation operation returned by the service.
* @throws ValidationException
* You either haven't provided a TargetAccountId
or are using the same value for
* TargetAccountId
and SourceAccountId
.
* @throws AccessDeniedException
* The user is not authorized to access a resource.
* @throws ResourceNotFoundException
* The resource could not be found.
* @throws ConflictException
* The TargetAccountId
is already linked or invited.
* @throws InternalServerException
* Unexpected server error occured.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws WorkSpacesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample WorkSpacesClient.DeleteAccountLinkInvitation
* @see AWS API Documentation
*/
@Override
public DeleteAccountLinkInvitationResponse deleteAccountLinkInvitation(
DeleteAccountLinkInvitationRequest deleteAccountLinkInvitationRequest) throws ValidationException,
AccessDeniedException, ResourceNotFoundException, ConflictException, InternalServerException, AwsServiceException,
SdkClientException, WorkSpacesException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DeleteAccountLinkInvitationResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteAccountLinkInvitationRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteAccountLinkInvitationRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "WorkSpaces");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteAccountLinkInvitation");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteAccountLinkInvitation").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(deleteAccountLinkInvitationRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteAccountLinkInvitationRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Deletes customized client branding. Client branding allows you to customize your WorkSpace's client login portal.
* You can tailor your login portal company logo, the support email address, support link, link to reset password,
* and a custom message for users trying to sign in.
*
*
* After you delete your customized client branding, your login portal reverts to the default client branding.
*
*
* @param deleteClientBrandingRequest
* @return Result of the DeleteClientBranding operation returned by the service.
* @throws InvalidParameterValuesException
* One or more parameter values are not valid.
* @throws ResourceNotFoundException
* The resource could not be found.
* @throws AccessDeniedException
* The user is not authorized to access a resource.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws WorkSpacesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample WorkSpacesClient.DeleteClientBranding
* @see AWS API Documentation
*/
@Override
public DeleteClientBrandingResponse deleteClientBranding(DeleteClientBrandingRequest deleteClientBrandingRequest)
throws InvalidParameterValuesException, ResourceNotFoundException, AccessDeniedException, AwsServiceException,
SdkClientException, WorkSpacesException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DeleteClientBrandingResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteClientBrandingRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteClientBrandingRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "WorkSpaces");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteClientBranding");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeleteClientBranding").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(deleteClientBrandingRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteClientBrandingRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Deletes a client-add-in for Amazon Connect that is configured within a directory.
*
*
* @param deleteConnectClientAddInRequest
* @return Result of the DeleteConnectClientAddIn operation returned by the service.
* @throws InvalidParameterValuesException
* One or more parameter values are not valid.
* @throws ResourceNotFoundException
* The resource could not be found.
* @throws AccessDeniedException
* The user is not authorized to access a resource.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws WorkSpacesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample WorkSpacesClient.DeleteConnectClientAddIn
* @see AWS API Documentation
*/
@Override
public DeleteConnectClientAddInResponse deleteConnectClientAddIn(
DeleteConnectClientAddInRequest deleteConnectClientAddInRequest) throws InvalidParameterValuesException,
ResourceNotFoundException, AccessDeniedException, AwsServiceException, SdkClientException, WorkSpacesException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DeleteConnectClientAddInResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteConnectClientAddInRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteConnectClientAddInRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "WorkSpaces");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteConnectClientAddIn");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeleteConnectClientAddIn").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(deleteConnectClientAddInRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteConnectClientAddInRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Deletes the specified connection alias. For more information, see Cross-Region
* Redirection for Amazon WorkSpaces.
*
*
*
* If you will no longer be using a fully qualified domain name (FQDN) as the registration code for your
* WorkSpaces users, you must take certain precautions to prevent potential security issues. For more
* information, see Security Considerations if You Stop Using Cross-Region Redirection.
*
*
*
* To delete a connection alias that has been shared, the shared account must first disassociate the connection
* alias from any directories it has been associated with. Then you must unshare the connection alias from the
* account it has been shared with. You can delete a connection alias only after it is no longer shared with any
* accounts or associated with any directories.
*
*
*
* @param deleteConnectionAliasRequest
* @return Result of the DeleteConnectionAlias operation returned by the service.
* @throws ResourceNotFoundException
* The resource could not be found.
* @throws ResourceAssociatedException
* The resource is associated with a directory.
* @throws AccessDeniedException
* The user is not authorized to access a resource.
* @throws InvalidParameterValuesException
* One or more parameter values are not valid.
* @throws InvalidResourceStateException
* The state of the resource is not valid for this operation.
* @throws OperationNotSupportedException
* This operation is not supported.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws WorkSpacesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample WorkSpacesClient.DeleteConnectionAlias
* @see AWS API Documentation
*/
@Override
public DeleteConnectionAliasResponse deleteConnectionAlias(DeleteConnectionAliasRequest deleteConnectionAliasRequest)
throws ResourceNotFoundException, ResourceAssociatedException, AccessDeniedException,
InvalidParameterValuesException, InvalidResourceStateException, OperationNotSupportedException, AwsServiceException,
SdkClientException, WorkSpacesException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DeleteConnectionAliasResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteConnectionAliasRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteConnectionAliasRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "WorkSpaces");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteConnectionAlias");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeleteConnectionAlias").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(deleteConnectionAliasRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteConnectionAliasRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Deletes the specified IP access control group.
*
*
* You cannot delete an IP access control group that is associated with a directory.
*
*
* @param deleteIpGroupRequest
* @return Result of the DeleteIpGroup operation returned by the service.
* @throws InvalidParameterValuesException
* One or more parameter values are not valid.
* @throws ResourceNotFoundException
* The resource could not be found.
* @throws ResourceAssociatedException
* The resource is associated with a directory.
* @throws AccessDeniedException
* The user is not authorized to access a resource.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws WorkSpacesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample WorkSpacesClient.DeleteIpGroup
* @see AWS API
* Documentation
*/
@Override
public DeleteIpGroupResponse deleteIpGroup(DeleteIpGroupRequest deleteIpGroupRequest) throws InvalidParameterValuesException,
ResourceNotFoundException, ResourceAssociatedException, AccessDeniedException, AwsServiceException,
SdkClientException, WorkSpacesException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
DeleteIpGroupResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteIpGroupRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteIpGroupRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "WorkSpaces");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteIpGroup");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeleteIpGroup").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(deleteIpGroupRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteIpGroupRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Deletes the specified tags from the specified WorkSpaces resource.
*
*
* @param deleteTagsRequest
* @return Result of the DeleteTags operation returned by the service.
* @throws ResourceNotFoundException
* The resource could not be found.
* @throws InvalidParameterValuesException
* One or more parameter values are not valid.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws WorkSpacesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample WorkSpacesClient.DeleteTags
* @see AWS API
* Documentation
*/
@Override
public DeleteTagsResponse deleteTags(DeleteTagsRequest deleteTagsRequest) throws ResourceNotFoundException,
InvalidParameterValuesException, AwsServiceException, SdkClientException, WorkSpacesException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
DeleteTagsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteTagsRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteTagsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "WorkSpaces");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteTags");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeleteTags").withProtocolMetadata(protocolMetadata).withResponseHandler(responseHandler)
.withErrorResponseHandler(errorResponseHandler).withRequestConfiguration(clientConfiguration)
.withInput(deleteTagsRequest).withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteTagsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Deletes the specified WorkSpace bundle. For more information about deleting WorkSpace bundles, see Delete a Custom WorkSpaces
* Bundle or Image.
*
*
* @param deleteWorkspaceBundleRequest
* @return Result of the DeleteWorkspaceBundle operation returned by the service.
* @throws InvalidParameterValuesException
* One or more parameter values are not valid.
* @throws ResourceNotFoundException
* The resource could not be found.
* @throws ResourceAssociatedException
* The resource is associated with a directory.
* @throws AccessDeniedException
* The user is not authorized to access a resource.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws WorkSpacesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample WorkSpacesClient.DeleteWorkspaceBundle
* @see AWS API Documentation
*/
@Override
public DeleteWorkspaceBundleResponse deleteWorkspaceBundle(DeleteWorkspaceBundleRequest deleteWorkspaceBundleRequest)
throws InvalidParameterValuesException, ResourceNotFoundException, ResourceAssociatedException,
AccessDeniedException, AwsServiceException, SdkClientException, WorkSpacesException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DeleteWorkspaceBundleResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteWorkspaceBundleRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteWorkspaceBundleRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "WorkSpaces");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteWorkspaceBundle");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeleteWorkspaceBundle").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(deleteWorkspaceBundleRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteWorkspaceBundleRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Deletes the specified image from your account. To delete an image, you must first delete any bundles that are
* associated with the image and unshare the image if it is shared with other accounts.
*
*
* @param deleteWorkspaceImageRequest
* @return Result of the DeleteWorkspaceImage operation returned by the service.
* @throws ResourceAssociatedException
* The resource is associated with a directory.
* @throws InvalidResourceStateException
* The state of the resource is not valid for this operation.
* @throws AccessDeniedException
* The user is not authorized to access a resource.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws WorkSpacesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample WorkSpacesClient.DeleteWorkspaceImage
* @see AWS API Documentation
*/
@Override
public DeleteWorkspaceImageResponse deleteWorkspaceImage(DeleteWorkspaceImageRequest deleteWorkspaceImageRequest)
throws ResourceAssociatedException, InvalidResourceStateException, AccessDeniedException, AwsServiceException,
SdkClientException, WorkSpacesException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DeleteWorkspaceImageResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deleteWorkspaceImageRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteWorkspaceImageRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "WorkSpaces");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteWorkspaceImage");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DeleteWorkspaceImage").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(deleteWorkspaceImageRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeleteWorkspaceImageRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Deploys associated applications to the specified WorkSpace
*
*
* @param deployWorkspaceApplicationsRequest
* @return Result of the DeployWorkspaceApplications operation returned by the service.
* @throws AccessDeniedException
* The user is not authorized to access a resource.
* @throws InvalidParameterValuesException
* One or more parameter values are not valid.
* @throws OperationNotSupportedException
* This operation is not supported.
* @throws ResourceInUseException
* The specified resource is currently in use.
* @throws ResourceNotFoundException
* The resource could not be found.
* @throws IncompatibleApplicationsException
* The specified application is not compatible with the resource.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws WorkSpacesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample WorkSpacesClient.DeployWorkspaceApplications
* @see AWS API Documentation
*/
@Override
public DeployWorkspaceApplicationsResponse deployWorkspaceApplications(
DeployWorkspaceApplicationsRequest deployWorkspaceApplicationsRequest) throws AccessDeniedException,
InvalidParameterValuesException, OperationNotSupportedException, ResourceInUseException, ResourceNotFoundException,
IncompatibleApplicationsException, AwsServiceException, SdkClientException, WorkSpacesException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DeployWorkspaceApplicationsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deployWorkspaceApplicationsRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deployWorkspaceApplicationsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "WorkSpaces");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeployWorkspaceApplications");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeployWorkspaceApplications").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(deployWorkspaceApplicationsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeployWorkspaceApplicationsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Deregisters the specified directory. This operation is asynchronous and returns before the WorkSpace directory is
* deregistered. If any WorkSpaces are registered to this directory, you must remove them before you can deregister
* the directory.
*
*
*
* Simple AD and AD Connector are made available to you free of charge to use with WorkSpaces. If there are no
* WorkSpaces being used with your Simple AD or AD Connector directory for 30 consecutive days, this directory will
* be automatically deregistered for use with Amazon WorkSpaces, and you will be charged for this directory as per
* the Directory Service pricing terms.
*
*
* To delete empty directories, see Delete the
* Directory for Your WorkSpaces. If you delete your Simple AD or AD Connector directory, you can always create
* a new one when you want to start using WorkSpaces again.
*
*
*
* @param deregisterWorkspaceDirectoryRequest
* @return Result of the DeregisterWorkspaceDirectory operation returned by the service.
* @throws AccessDeniedException
* The user is not authorized to access a resource.
* @throws InvalidParameterValuesException
* One or more parameter values are not valid.
* @throws OperationNotSupportedException
* This operation is not supported.
* @throws ResourceNotFoundException
* The resource could not be found.
* @throws InvalidResourceStateException
* The state of the resource is not valid for this operation.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws WorkSpacesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample WorkSpacesClient.DeregisterWorkspaceDirectory
* @see AWS API Documentation
*/
@Override
public DeregisterWorkspaceDirectoryResponse deregisterWorkspaceDirectory(
DeregisterWorkspaceDirectoryRequest deregisterWorkspaceDirectoryRequest) throws AccessDeniedException,
InvalidParameterValuesException, OperationNotSupportedException, ResourceNotFoundException,
InvalidResourceStateException, AwsServiceException, SdkClientException, WorkSpacesException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DeregisterWorkspaceDirectoryResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(deregisterWorkspaceDirectoryRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, deregisterWorkspaceDirectoryRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "WorkSpaces");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeregisterWorkspaceDirectory");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DeregisterWorkspaceDirectory").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(deregisterWorkspaceDirectoryRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DeregisterWorkspaceDirectoryRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Retrieves a list that describes the configuration of Bring Your Own License (BYOL) for the specified account.
*
*
* @param describeAccountRequest
* @return Result of the DescribeAccount operation returned by the service.
* @throws AccessDeniedException
* The user is not authorized to access a resource.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws WorkSpacesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample WorkSpacesClient.DescribeAccount
* @see AWS
* API Documentation
*/
@Override
public DescribeAccountResponse describeAccount(DescribeAccountRequest describeAccountRequest) throws AccessDeniedException,
AwsServiceException, SdkClientException, WorkSpacesException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
DescribeAccountResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeAccountRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, describeAccountRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "WorkSpaces");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeAccount");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DescribeAccount").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(describeAccountRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DescribeAccountRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Retrieves a list that describes modifications to the configuration of Bring Your Own License (BYOL) for the
* specified account.
*
*
* @param describeAccountModificationsRequest
* @return Result of the DescribeAccountModifications operation returned by the service.
* @throws AccessDeniedException
* The user is not authorized to access a resource.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws WorkSpacesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample WorkSpacesClient.DescribeAccountModifications
* @see AWS API Documentation
*/
@Override
public DescribeAccountModificationsResponse describeAccountModifications(
DescribeAccountModificationsRequest describeAccountModificationsRequest) throws AccessDeniedException,
AwsServiceException, SdkClientException, WorkSpacesException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DescribeAccountModificationsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeAccountModificationsRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, describeAccountModificationsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "WorkSpaces");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeAccountModifications");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeAccountModifications").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(describeAccountModificationsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DescribeAccountModificationsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Describes the associations between the application and the specified associated resources.
*
*
* @param describeApplicationAssociationsRequest
* @return Result of the DescribeApplicationAssociations operation returned by the service.
* @throws AccessDeniedException
* The user is not authorized to access a resource.
* @throws InvalidParameterValuesException
* One or more parameter values are not valid.
* @throws OperationNotSupportedException
* This operation is not supported.
* @throws ResourceNotFoundException
* The resource could not be found.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws WorkSpacesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample WorkSpacesClient.DescribeApplicationAssociations
* @see AWS API Documentation
*/
@Override
public DescribeApplicationAssociationsResponse describeApplicationAssociations(
DescribeApplicationAssociationsRequest describeApplicationAssociationsRequest) throws AccessDeniedException,
InvalidParameterValuesException, OperationNotSupportedException, ResourceNotFoundException, AwsServiceException,
SdkClientException, WorkSpacesException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DescribeApplicationAssociationsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeApplicationAssociationsRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
describeApplicationAssociationsRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "WorkSpaces");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeApplicationAssociations");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeApplicationAssociations").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(describeApplicationAssociationsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DescribeApplicationAssociationsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Describes the specified applications by filtering based on their compute types, license availability, operating
* systems, and owners.
*
*
* @param describeApplicationsRequest
* @return Result of the DescribeApplications operation returned by the service.
* @throws AccessDeniedException
* The user is not authorized to access a resource.
* @throws InvalidParameterValuesException
* One or more parameter values are not valid.
* @throws OperationNotSupportedException
* This operation is not supported.
* @throws ResourceNotFoundException
* The resource could not be found.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws WorkSpacesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample WorkSpacesClient.DescribeApplications
* @see AWS API Documentation
*/
@Override
public DescribeApplicationsResponse describeApplications(DescribeApplicationsRequest describeApplicationsRequest)
throws AccessDeniedException, InvalidParameterValuesException, OperationNotSupportedException,
ResourceNotFoundException, AwsServiceException, SdkClientException, WorkSpacesException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DescribeApplicationsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeApplicationsRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, describeApplicationsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "WorkSpaces");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeApplications");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DescribeApplications").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(describeApplicationsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DescribeApplicationsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Describes the associations between the applications and the specified bundle.
*
*
* @param describeBundleAssociationsRequest
* @return Result of the DescribeBundleAssociations operation returned by the service.
* @throws AccessDeniedException
* The user is not authorized to access a resource.
* @throws InvalidParameterValuesException
* One or more parameter values are not valid.
* @throws OperationNotSupportedException
* This operation is not supported.
* @throws ResourceNotFoundException
* The resource could not be found.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws WorkSpacesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample WorkSpacesClient.DescribeBundleAssociations
* @see AWS API Documentation
*/
@Override
public DescribeBundleAssociationsResponse describeBundleAssociations(
DescribeBundleAssociationsRequest describeBundleAssociationsRequest) throws AccessDeniedException,
InvalidParameterValuesException, OperationNotSupportedException, ResourceNotFoundException, AwsServiceException,
SdkClientException, WorkSpacesException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DescribeBundleAssociationsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeBundleAssociationsRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, describeBundleAssociationsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "WorkSpaces");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeBundleAssociations");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeBundleAssociations").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(describeBundleAssociationsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DescribeBundleAssociationsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Describes the specified client branding. Client branding allows you to customize the log in page of various
* device types for your users. You can add your company logo, the support email address, support link, link to
* reset password, and a custom message for users trying to sign in.
*
*
*
* Only device types that have branding information configured will be shown in the response.
*
*
*
* @param describeClientBrandingRequest
* @return Result of the DescribeClientBranding operation returned by the service.
* @throws InvalidParameterValuesException
* One or more parameter values are not valid.
* @throws ResourceNotFoundException
* The resource could not be found.
* @throws AccessDeniedException
* The user is not authorized to access a resource.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws WorkSpacesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample WorkSpacesClient.DescribeClientBranding
* @see AWS API Documentation
*/
@Override
public DescribeClientBrandingResponse describeClientBranding(DescribeClientBrandingRequest describeClientBrandingRequest)
throws InvalidParameterValuesException, ResourceNotFoundException, AccessDeniedException, AwsServiceException,
SdkClientException, WorkSpacesException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DescribeClientBrandingResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeClientBrandingRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, describeClientBrandingRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "WorkSpaces");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeClientBranding");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeClientBranding").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(describeClientBrandingRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DescribeClientBrandingRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Retrieves a list that describes one or more specified Amazon WorkSpaces clients.
*
*
* @param describeClientPropertiesRequest
* @return Result of the DescribeClientProperties operation returned by the service.
* @throws InvalidParameterValuesException
* One or more parameter values are not valid.
* @throws ResourceNotFoundException
* The resource could not be found.
* @throws AccessDeniedException
* The user is not authorized to access a resource.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws WorkSpacesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample WorkSpacesClient.DescribeClientProperties
* @see AWS API Documentation
*/
@Override
public DescribeClientPropertiesResponse describeClientProperties(
DescribeClientPropertiesRequest describeClientPropertiesRequest) throws InvalidParameterValuesException,
ResourceNotFoundException, AccessDeniedException, AwsServiceException, SdkClientException, WorkSpacesException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DescribeClientPropertiesResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeClientPropertiesRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, describeClientPropertiesRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "WorkSpaces");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeClientProperties");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeClientProperties").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(describeClientPropertiesRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DescribeClientPropertiesRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Retrieves a list of Amazon Connect client add-ins that have been created.
*
*
* @param describeConnectClientAddInsRequest
* @return Result of the DescribeConnectClientAddIns operation returned by the service.
* @throws InvalidParameterValuesException
* One or more parameter values are not valid.
* @throws ResourceNotFoundException
* The resource could not be found.
* @throws AccessDeniedException
* The user is not authorized to access a resource.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws WorkSpacesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample WorkSpacesClient.DescribeConnectClientAddIns
* @see AWS API Documentation
*/
@Override
public DescribeConnectClientAddInsResponse describeConnectClientAddIns(
DescribeConnectClientAddInsRequest describeConnectClientAddInsRequest) throws InvalidParameterValuesException,
ResourceNotFoundException, AccessDeniedException, AwsServiceException, SdkClientException, WorkSpacesException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DescribeConnectClientAddInsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeConnectClientAddInsRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, describeConnectClientAddInsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "WorkSpaces");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeConnectClientAddIns");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeConnectClientAddIns").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(describeConnectClientAddInsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DescribeConnectClientAddInsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Describes the permissions that the owner of a connection alias has granted to another Amazon Web Services account
* for the specified connection alias. For more information, see Cross-Region
* Redirection for Amazon WorkSpaces.
*
*
* @param describeConnectionAliasPermissionsRequest
* @return Result of the DescribeConnectionAliasPermissions operation returned by the service.
* @throws AccessDeniedException
* The user is not authorized to access a resource.
* @throws InvalidParameterValuesException
* One or more parameter values are not valid.
* @throws ResourceNotFoundException
* The resource could not be found.
* @throws OperationNotSupportedException
* This operation is not supported.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws WorkSpacesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample WorkSpacesClient.DescribeConnectionAliasPermissions
* @see AWS API Documentation
*/
@Override
public DescribeConnectionAliasPermissionsResponse describeConnectionAliasPermissions(
DescribeConnectionAliasPermissionsRequest describeConnectionAliasPermissionsRequest) throws AccessDeniedException,
InvalidParameterValuesException, ResourceNotFoundException, OperationNotSupportedException, AwsServiceException,
SdkClientException, WorkSpacesException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DescribeConnectionAliasPermissionsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeConnectionAliasPermissionsRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
describeConnectionAliasPermissionsRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "WorkSpaces");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeConnectionAliasPermissions");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeConnectionAliasPermissions").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(describeConnectionAliasPermissionsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DescribeConnectionAliasPermissionsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Retrieves a list that describes the connection aliases used for cross-Region redirection. For more information,
* see
* Cross-Region Redirection for Amazon WorkSpaces.
*
*
* @param describeConnectionAliasesRequest
* @return Result of the DescribeConnectionAliases operation returned by the service.
* @throws AccessDeniedException
* The user is not authorized to access a resource.
* @throws InvalidParameterValuesException
* One or more parameter values are not valid.
* @throws OperationNotSupportedException
* This operation is not supported.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws WorkSpacesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample WorkSpacesClient.DescribeConnectionAliases
* @see AWS API Documentation
*/
@Override
public DescribeConnectionAliasesResponse describeConnectionAliases(
DescribeConnectionAliasesRequest describeConnectionAliasesRequest) throws AccessDeniedException,
InvalidParameterValuesException, OperationNotSupportedException, AwsServiceException, SdkClientException,
WorkSpacesException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DescribeConnectionAliasesResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeConnectionAliasesRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, describeConnectionAliasesRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "WorkSpaces");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeConnectionAliases");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeConnectionAliases").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(describeConnectionAliasesRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DescribeConnectionAliasesRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Describes the associations between the applications and the specified image.
*
*
* @param describeImageAssociationsRequest
* @return Result of the DescribeImageAssociations operation returned by the service.
* @throws AccessDeniedException
* The user is not authorized to access a resource.
* @throws InvalidParameterValuesException
* One or more parameter values are not valid.
* @throws OperationNotSupportedException
* This operation is not supported.
* @throws ResourceNotFoundException
* The resource could not be found.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws WorkSpacesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample WorkSpacesClient.DescribeImageAssociations
* @see AWS API Documentation
*/
@Override
public DescribeImageAssociationsResponse describeImageAssociations(
DescribeImageAssociationsRequest describeImageAssociationsRequest) throws AccessDeniedException,
InvalidParameterValuesException, OperationNotSupportedException, ResourceNotFoundException, AwsServiceException,
SdkClientException, WorkSpacesException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DescribeImageAssociationsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeImageAssociationsRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, describeImageAssociationsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "WorkSpaces");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeImageAssociations");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeImageAssociations").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(describeImageAssociationsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DescribeImageAssociationsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Describes one or more of your IP access control groups.
*
*
* @param describeIpGroupsRequest
* @return Result of the DescribeIpGroups operation returned by the service.
* @throws InvalidParameterValuesException
* One or more parameter values are not valid.
* @throws AccessDeniedException
* The user is not authorized to access a resource.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws WorkSpacesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample WorkSpacesClient.DescribeIpGroups
* @see AWS
* API Documentation
*/
@Override
public DescribeIpGroupsResponse describeIpGroups(DescribeIpGroupsRequest describeIpGroupsRequest)
throws InvalidParameterValuesException, AccessDeniedException, AwsServiceException, SdkClientException,
WorkSpacesException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
DescribeIpGroupsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeIpGroupsRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, describeIpGroupsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "WorkSpaces");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeIpGroups");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DescribeIpGroups").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(describeIpGroupsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DescribeIpGroupsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Describes the specified tags for the specified WorkSpaces resource.
*
*
* @param describeTagsRequest
* @return Result of the DescribeTags operation returned by the service.
* @throws ResourceNotFoundException
* The resource could not be found.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws WorkSpacesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample WorkSpacesClient.DescribeTags
* @see AWS API
* Documentation
*/
@Override
public DescribeTagsResponse describeTags(DescribeTagsRequest describeTagsRequest) throws ResourceNotFoundException,
AwsServiceException, SdkClientException, WorkSpacesException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
DescribeTagsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeTagsRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, describeTagsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "WorkSpaces");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeTags");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DescribeTags").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(describeTagsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DescribeTagsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Describes the associations betweens applications and the specified WorkSpace.
*
*
* @param describeWorkspaceAssociationsRequest
* @return Result of the DescribeWorkspaceAssociations operation returned by the service.
* @throws AccessDeniedException
* The user is not authorized to access a resource.
* @throws InvalidParameterValuesException
* One or more parameter values are not valid.
* @throws OperationNotSupportedException
* This operation is not supported.
* @throws ResourceNotFoundException
* The resource could not be found.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws WorkSpacesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample WorkSpacesClient.DescribeWorkspaceAssociations
* @see AWS API Documentation
*/
@Override
public DescribeWorkspaceAssociationsResponse describeWorkspaceAssociations(
DescribeWorkspaceAssociationsRequest describeWorkspaceAssociationsRequest) throws AccessDeniedException,
InvalidParameterValuesException, OperationNotSupportedException, ResourceNotFoundException, AwsServiceException,
SdkClientException, WorkSpacesException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DescribeWorkspaceAssociationsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeWorkspaceAssociationsRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
describeWorkspaceAssociationsRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "WorkSpaces");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeWorkspaceAssociations");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeWorkspaceAssociations").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(describeWorkspaceAssociationsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DescribeWorkspaceAssociationsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Retrieves a list that describes the available WorkSpace bundles.
*
*
* You can filter the results using either bundle ID or owner, but not both.
*
*
* @param describeWorkspaceBundlesRequest
* @return Result of the DescribeWorkspaceBundles operation returned by the service.
* @throws InvalidParameterValuesException
* One or more parameter values are not valid.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws WorkSpacesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample WorkSpacesClient.DescribeWorkspaceBundles
* @see AWS API Documentation
*/
@Override
public DescribeWorkspaceBundlesResponse describeWorkspaceBundles(
DescribeWorkspaceBundlesRequest describeWorkspaceBundlesRequest) throws InvalidParameterValuesException,
AwsServiceException, SdkClientException, WorkSpacesException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DescribeWorkspaceBundlesResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeWorkspaceBundlesRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, describeWorkspaceBundlesRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "WorkSpaces");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeWorkspaceBundles");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeWorkspaceBundles").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(describeWorkspaceBundlesRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DescribeWorkspaceBundlesRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Describes the available directories that are registered with Amazon WorkSpaces.
*
*
* @param describeWorkspaceDirectoriesRequest
* @return Result of the DescribeWorkspaceDirectories operation returned by the service.
* @throws InvalidParameterValuesException
* One or more parameter values are not valid.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws WorkSpacesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample WorkSpacesClient.DescribeWorkspaceDirectories
* @see AWS API Documentation
*/
@Override
public DescribeWorkspaceDirectoriesResponse describeWorkspaceDirectories(
DescribeWorkspaceDirectoriesRequest describeWorkspaceDirectoriesRequest) throws InvalidParameterValuesException,
AwsServiceException, SdkClientException, WorkSpacesException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DescribeWorkspaceDirectoriesResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeWorkspaceDirectoriesRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, describeWorkspaceDirectoriesRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "WorkSpaces");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeWorkspaceDirectories");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeWorkspaceDirectories").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(describeWorkspaceDirectoriesRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DescribeWorkspaceDirectoriesRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Describes the permissions that the owner of an image has granted to other Amazon Web Services accounts for an
* image.
*
*
* @param describeWorkspaceImagePermissionsRequest
* @return Result of the DescribeWorkspaceImagePermissions operation returned by the service.
* @throws ResourceNotFoundException
* The resource could not be found.
* @throws AccessDeniedException
* The user is not authorized to access a resource.
* @throws InvalidParameterValuesException
* One or more parameter values are not valid.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws WorkSpacesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample WorkSpacesClient.DescribeWorkspaceImagePermissions
* @see AWS API Documentation
*/
@Override
public DescribeWorkspaceImagePermissionsResponse describeWorkspaceImagePermissions(
DescribeWorkspaceImagePermissionsRequest describeWorkspaceImagePermissionsRequest) throws ResourceNotFoundException,
AccessDeniedException, InvalidParameterValuesException, AwsServiceException, SdkClientException, WorkSpacesException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DescribeWorkspaceImagePermissionsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeWorkspaceImagePermissionsRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
describeWorkspaceImagePermissionsRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "WorkSpaces");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeWorkspaceImagePermissions");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeWorkspaceImagePermissions").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(describeWorkspaceImagePermissionsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DescribeWorkspaceImagePermissionsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Retrieves a list that describes one or more specified images, if the image identifiers are provided. Otherwise,
* all images in the account are described.
*
*
* @param describeWorkspaceImagesRequest
* @return Result of the DescribeWorkspaceImages operation returned by the service.
* @throws AccessDeniedException
* The user is not authorized to access a resource.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws WorkSpacesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample WorkSpacesClient.DescribeWorkspaceImages
* @see AWS API Documentation
*/
@Override
public DescribeWorkspaceImagesResponse describeWorkspaceImages(DescribeWorkspaceImagesRequest describeWorkspaceImagesRequest)
throws AccessDeniedException, AwsServiceException, SdkClientException, WorkSpacesException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DescribeWorkspaceImagesResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeWorkspaceImagesRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, describeWorkspaceImagesRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "WorkSpaces");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeWorkspaceImages");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeWorkspaceImages").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(describeWorkspaceImagesRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DescribeWorkspaceImagesRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Describes the snapshots for the specified WorkSpace.
*
*
* @param describeWorkspaceSnapshotsRequest
* @return Result of the DescribeWorkspaceSnapshots operation returned by the service.
* @throws InvalidParameterValuesException
* One or more parameter values are not valid.
* @throws ResourceNotFoundException
* The resource could not be found.
* @throws AccessDeniedException
* The user is not authorized to access a resource.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws WorkSpacesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample WorkSpacesClient.DescribeWorkspaceSnapshots
* @see AWS API Documentation
*/
@Override
public DescribeWorkspaceSnapshotsResponse describeWorkspaceSnapshots(
DescribeWorkspaceSnapshotsRequest describeWorkspaceSnapshotsRequest) throws InvalidParameterValuesException,
ResourceNotFoundException, AccessDeniedException, AwsServiceException, SdkClientException, WorkSpacesException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DescribeWorkspaceSnapshotsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeWorkspaceSnapshotsRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, describeWorkspaceSnapshotsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "WorkSpaces");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeWorkspaceSnapshots");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeWorkspaceSnapshots").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(describeWorkspaceSnapshotsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DescribeWorkspaceSnapshotsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Describes the specified WorkSpaces.
*
*
* You can filter the results by using the bundle identifier, directory identifier, or owner, but you can specify
* only one filter at a time.
*
*
* @param describeWorkspacesRequest
* @return Result of the DescribeWorkspaces operation returned by the service.
* @throws InvalidParameterValuesException
* One or more parameter values are not valid.
* @throws ResourceUnavailableException
* The specified resource is not available.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws WorkSpacesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample WorkSpacesClient.DescribeWorkspaces
* @see AWS
* API Documentation
*/
@Override
public DescribeWorkspacesResponse describeWorkspaces(DescribeWorkspacesRequest describeWorkspacesRequest)
throws InvalidParameterValuesException, ResourceUnavailableException, AwsServiceException, SdkClientException,
WorkSpacesException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DescribeWorkspacesResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeWorkspacesRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, describeWorkspacesRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "WorkSpaces");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeWorkspaces");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DescribeWorkspaces").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(describeWorkspacesRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DescribeWorkspacesRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Describes the connection status of the specified WorkSpaces.
*
*
* @param describeWorkspacesConnectionStatusRequest
* @return Result of the DescribeWorkspacesConnectionStatus operation returned by the service.
* @throws InvalidParameterValuesException
* One or more parameter values are not valid.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws WorkSpacesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample WorkSpacesClient.DescribeWorkspacesConnectionStatus
* @see AWS API Documentation
*/
@Override
public DescribeWorkspacesConnectionStatusResponse describeWorkspacesConnectionStatus(
DescribeWorkspacesConnectionStatusRequest describeWorkspacesConnectionStatusRequest)
throws InvalidParameterValuesException, AwsServiceException, SdkClientException, WorkSpacesException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DescribeWorkspacesConnectionStatusResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeWorkspacesConnectionStatusRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
describeWorkspacesConnectionStatusRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "WorkSpaces");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeWorkspacesConnectionStatus");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeWorkspacesConnectionStatus").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(describeWorkspacesConnectionStatusRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DescribeWorkspacesConnectionStatusRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Retrieves a list that describes the streaming sessions for a specified pool.
*
*
* @param describeWorkspacesPoolSessionsRequest
* @return Result of the DescribeWorkspacesPoolSessions operation returned by the service.
* @throws InvalidParameterValuesException
* One or more parameter values are not valid.
* @throws ResourceNotFoundException
* The resource could not be found.
* @throws AccessDeniedException
* The user is not authorized to access a resource.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws WorkSpacesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample WorkSpacesClient.DescribeWorkspacesPoolSessions
* @see AWS API Documentation
*/
@Override
public DescribeWorkspacesPoolSessionsResponse describeWorkspacesPoolSessions(
DescribeWorkspacesPoolSessionsRequest describeWorkspacesPoolSessionsRequest) throws InvalidParameterValuesException,
ResourceNotFoundException, AccessDeniedException, AwsServiceException, SdkClientException, WorkSpacesException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DescribeWorkspacesPoolSessionsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeWorkspacesPoolSessionsRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
describeWorkspacesPoolSessionsRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "WorkSpaces");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeWorkspacesPoolSessions");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeWorkspacesPoolSessions").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(describeWorkspacesPoolSessionsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DescribeWorkspacesPoolSessionsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Describes the specified WorkSpaces Pools.
*
*
* @param describeWorkspacesPoolsRequest
* @return Result of the DescribeWorkspacesPools operation returned by the service.
* @throws InvalidParameterValuesException
* One or more parameter values are not valid.
* @throws ResourceNotFoundException
* The resource could not be found.
* @throws AccessDeniedException
* The user is not authorized to access a resource.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws WorkSpacesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample WorkSpacesClient.DescribeWorkspacesPools
* @see AWS API Documentation
*/
@Override
public DescribeWorkspacesPoolsResponse describeWorkspacesPools(DescribeWorkspacesPoolsRequest describeWorkspacesPoolsRequest)
throws InvalidParameterValuesException, ResourceNotFoundException, AccessDeniedException, AwsServiceException,
SdkClientException, WorkSpacesException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DescribeWorkspacesPoolsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(describeWorkspacesPoolsRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, describeWorkspacesPoolsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "WorkSpaces");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DescribeWorkspacesPools");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DescribeWorkspacesPools").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(describeWorkspacesPoolsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DescribeWorkspacesPoolsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Disassociates a connection alias from a directory. Disassociating a connection alias disables cross-Region
* redirection between two directories in different Regions. For more information, see Cross-Region
* Redirection for Amazon WorkSpaces.
*
*
*
* Before performing this operation, call
* DescribeConnectionAliases to make sure that the current state of the connection alias is CREATED
* .
*
*
*
* @param disassociateConnectionAliasRequest
* @return Result of the DisassociateConnectionAlias operation returned by the service.
* @throws AccessDeniedException
* The user is not authorized to access a resource.
* @throws ResourceNotFoundException
* The resource could not be found.
* @throws InvalidParameterValuesException
* One or more parameter values are not valid.
* @throws InvalidResourceStateException
* The state of the resource is not valid for this operation.
* @throws OperationNotSupportedException
* This operation is not supported.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws WorkSpacesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample WorkSpacesClient.DisassociateConnectionAlias
* @see AWS API Documentation
*/
@Override
public DisassociateConnectionAliasResponse disassociateConnectionAlias(
DisassociateConnectionAliasRequest disassociateConnectionAliasRequest) throws AccessDeniedException,
ResourceNotFoundException, InvalidParameterValuesException, InvalidResourceStateException,
OperationNotSupportedException, AwsServiceException, SdkClientException, WorkSpacesException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DisassociateConnectionAliasResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(disassociateConnectionAliasRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, disassociateConnectionAliasRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "WorkSpaces");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DisassociateConnectionAlias");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DisassociateConnectionAlias").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(disassociateConnectionAliasRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DisassociateConnectionAliasRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Disassociates the specified IP access control group from the specified directory.
*
*
* @param disassociateIpGroupsRequest
* @return Result of the DisassociateIpGroups operation returned by the service.
* @throws InvalidParameterValuesException
* One or more parameter values are not valid.
* @throws ResourceNotFoundException
* The resource could not be found.
* @throws InvalidResourceStateException
* The state of the resource is not valid for this operation.
* @throws AccessDeniedException
* The user is not authorized to access a resource.
* @throws OperationNotSupportedException
* This operation is not supported.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws WorkSpacesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample WorkSpacesClient.DisassociateIpGroups
* @see AWS API Documentation
*/
@Override
public DisassociateIpGroupsResponse disassociateIpGroups(DisassociateIpGroupsRequest disassociateIpGroupsRequest)
throws InvalidParameterValuesException, ResourceNotFoundException, InvalidResourceStateException,
AccessDeniedException, OperationNotSupportedException, AwsServiceException, SdkClientException, WorkSpacesException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DisassociateIpGroupsResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(disassociateIpGroupsRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, disassociateIpGroupsRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "WorkSpaces");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DisassociateIpGroups");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("DisassociateIpGroups").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(disassociateIpGroupsRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DisassociateIpGroupsRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Disassociates the specified application from a WorkSpace.
*
*
* @param disassociateWorkspaceApplicationRequest
* @return Result of the DisassociateWorkspaceApplication operation returned by the service.
* @throws AccessDeniedException
* The user is not authorized to access a resource.
* @throws InvalidParameterValuesException
* One or more parameter values are not valid.
* @throws OperationNotSupportedException
* This operation is not supported.
* @throws ResourceInUseException
* The specified resource is currently in use.
* @throws ResourceNotFoundException
* The resource could not be found.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws WorkSpacesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample WorkSpacesClient.DisassociateWorkspaceApplication
* @see AWS API Documentation
*/
@Override
public DisassociateWorkspaceApplicationResponse disassociateWorkspaceApplication(
DisassociateWorkspaceApplicationRequest disassociateWorkspaceApplicationRequest) throws AccessDeniedException,
InvalidParameterValuesException, OperationNotSupportedException, ResourceInUseException, ResourceNotFoundException,
AwsServiceException, SdkClientException, WorkSpacesException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, DisassociateWorkspaceApplicationResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(disassociateWorkspaceApplicationRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
disassociateWorkspaceApplicationRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "WorkSpaces");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DisassociateWorkspaceApplication");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("DisassociateWorkspaceApplication").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(disassociateWorkspaceApplicationRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new DisassociateWorkspaceApplicationRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Retrieves account link information.
*
*
* @param getAccountLinkRequest
* @return Result of the GetAccountLink operation returned by the service.
* @throws AccessDeniedException
* The user is not authorized to access a resource.
* @throws ValidationException
* You either haven't provided a TargetAccountId
or are using the same value for
* TargetAccountId
and SourceAccountId
.
* @throws ResourceNotFoundException
* The resource could not be found.
* @throws InternalServerException
* Unexpected server error occured.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws WorkSpacesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample WorkSpacesClient.GetAccountLink
* @see AWS API
* Documentation
*/
@Override
public GetAccountLinkResponse getAccountLink(GetAccountLinkRequest getAccountLinkRequest) throws AccessDeniedException,
ValidationException, ResourceNotFoundException, InternalServerException, AwsServiceException, SdkClientException,
WorkSpacesException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
GetAccountLinkResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(getAccountLinkRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, getAccountLinkRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "WorkSpaces");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetAccountLink");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("GetAccountLink").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(getAccountLinkRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new GetAccountLinkRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Imports client branding. Client branding allows you to customize your WorkSpace's client login portal. You can
* tailor your login portal company logo, the support email address, support link, link to reset password, and a
* custom message for users trying to sign in.
*
*
* After you import client branding, the default branding experience for the specified platform type is replaced
* with the imported experience
*
*
*
* -
*
* You must specify at least one platform type when importing client branding.
*
*
* -
*
* You can import up to 6 MB of data with each request. If your request exceeds this limit, you can import client
* branding for different platform types using separate requests.
*
*
* -
*
* In each platform type, the SupportEmail
and SupportLink
parameters are mutually
* exclusive. You can specify only one parameter for each platform type, but not both.
*
*
* -
*
* Imported data can take up to a minute to appear in the WorkSpaces client.
*
*
*
*
*
* @param importClientBrandingRequest
* @return Result of the ImportClientBranding operation returned by the service.
* @throws InvalidParameterValuesException
* One or more parameter values are not valid.
* @throws ResourceLimitExceededException
* Your resource limits have been exceeded.
* @throws ResourceNotFoundException
* The resource could not be found.
* @throws AccessDeniedException
* The user is not authorized to access a resource.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws WorkSpacesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample WorkSpacesClient.ImportClientBranding
* @see AWS API Documentation
*/
@Override
public ImportClientBrandingResponse importClientBranding(ImportClientBrandingRequest importClientBrandingRequest)
throws InvalidParameterValuesException, ResourceLimitExceededException, ResourceNotFoundException,
AccessDeniedException, AwsServiceException, SdkClientException, WorkSpacesException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, ImportClientBrandingResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(importClientBrandingRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, importClientBrandingRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "WorkSpaces");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ImportClientBranding");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("ImportClientBranding").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(importClientBrandingRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ImportClientBrandingRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Imports the specified Windows 10 or 11 Bring Your Own License (BYOL) image into Amazon WorkSpaces. The image must
* be an already licensed Amazon EC2 image that is in your Amazon Web Services account, and you must own the image.
* For more information about creating BYOL images, see Bring Your Own Windows
* Desktop Licenses.
*
*
* @param importWorkspaceImageRequest
* @return Result of the ImportWorkspaceImage operation returned by the service.
* @throws ResourceLimitExceededException
* Your resource limits have been exceeded.
* @throws ResourceAlreadyExistsException
* The specified resource already exists.
* @throws ResourceNotFoundException
* The resource could not be found.
* @throws OperationNotSupportedException
* This operation is not supported.
* @throws AccessDeniedException
* The user is not authorized to access a resource.
* @throws InvalidParameterValuesException
* One or more parameter values are not valid.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws WorkSpacesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample WorkSpacesClient.ImportWorkspaceImage
* @see AWS API Documentation
*/
@Override
public ImportWorkspaceImageResponse importWorkspaceImage(ImportWorkspaceImageRequest importWorkspaceImageRequest)
throws ResourceLimitExceededException, ResourceAlreadyExistsException, ResourceNotFoundException,
OperationNotSupportedException, AccessDeniedException, InvalidParameterValuesException, AwsServiceException,
SdkClientException, WorkSpacesException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, ImportWorkspaceImageResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(importWorkspaceImageRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, importWorkspaceImageRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "WorkSpaces");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ImportWorkspaceImage");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("ImportWorkspaceImage").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(importWorkspaceImageRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ImportWorkspaceImageRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Lists all account links.
*
*
* @param listAccountLinksRequest
* @return Result of the ListAccountLinks operation returned by the service.
* @throws AccessDeniedException
* The user is not authorized to access a resource.
* @throws ValidationException
* You either haven't provided a TargetAccountId
or are using the same value for
* TargetAccountId
and SourceAccountId
.
* @throws InternalServerException
* Unexpected server error occured.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws WorkSpacesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample WorkSpacesClient.ListAccountLinks
* @see AWS
* API Documentation
*/
@Override
public ListAccountLinksResponse listAccountLinks(ListAccountLinksRequest listAccountLinksRequest)
throws AccessDeniedException, ValidationException, InternalServerException, AwsServiceException, SdkClientException,
WorkSpacesException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
ListAccountLinksResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listAccountLinksRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, listAccountLinksRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "WorkSpaces");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListAccountLinks");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("ListAccountLinks").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(listAccountLinksRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ListAccountLinksRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Retrieves a list of IP address ranges, specified as IPv4 CIDR blocks, that you can use for the network management
* interface when you enable Bring Your Own License (BYOL).
*
*
* This operation can be run only by Amazon Web Services accounts that are enabled for BYOL. If your account isn't
* enabled for BYOL, you'll receive an AccessDeniedException
error.
*
*
* The management network interface is connected to a secure Amazon WorkSpaces management network. It is used for
* interactive streaming of the WorkSpace desktop to Amazon WorkSpaces clients, and to allow Amazon WorkSpaces to
* manage the WorkSpace.
*
*
* @param listAvailableManagementCidrRangesRequest
* @return Result of the ListAvailableManagementCidrRanges operation returned by the service.
* @throws InvalidParameterValuesException
* One or more parameter values are not valid.
* @throws AccessDeniedException
* The user is not authorized to access a resource.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws WorkSpacesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample WorkSpacesClient.ListAvailableManagementCidrRanges
* @see AWS API Documentation
*/
@Override
public ListAvailableManagementCidrRangesResponse listAvailableManagementCidrRanges(
ListAvailableManagementCidrRangesRequest listAvailableManagementCidrRangesRequest)
throws InvalidParameterValuesException, AccessDeniedException, AwsServiceException, SdkClientException,
WorkSpacesException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, ListAvailableManagementCidrRangesResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(listAvailableManagementCidrRangesRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
listAvailableManagementCidrRangesRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "WorkSpaces");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListAvailableManagementCidrRanges");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("ListAvailableManagementCidrRanges").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(listAvailableManagementCidrRangesRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ListAvailableManagementCidrRangesRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Migrates a WorkSpace from one operating system or bundle type to another, while retaining the data on the user
* volume.
*
*
* The migration process recreates the WorkSpace by using a new root volume from the target bundle image and the
* user volume from the last available snapshot of the original WorkSpace. During migration, the original
* D:\Users\%USERNAME%
user profile folder is renamed to
* D:\Users\%USERNAME%MMddyyTHHmmss%.NotMigrated
. A new D:\Users\%USERNAME%\
folder is
* generated by the new OS. Certain files in the old user profile are moved to the new user profile.
*
*
* For available migration scenarios, details about what happens during migration, and best practices, see Migrate a WorkSpace.
*
*
* @param migrateWorkspaceRequest
* @return Result of the MigrateWorkspace operation returned by the service.
* @throws InvalidParameterValuesException
* One or more parameter values are not valid.
* @throws ResourceNotFoundException
* The resource could not be found.
* @throws AccessDeniedException
* The user is not authorized to access a resource.
* @throws OperationNotSupportedException
* This operation is not supported.
* @throws OperationInProgressException
* The properties of this WorkSpace are currently being modified. Try again in a moment.
* @throws ResourceUnavailableException
* The specified resource is not available.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws WorkSpacesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample WorkSpacesClient.MigrateWorkspace
* @see AWS
* API Documentation
*/
@Override
public MigrateWorkspaceResponse migrateWorkspace(MigrateWorkspaceRequest migrateWorkspaceRequest)
throws InvalidParameterValuesException, ResourceNotFoundException, AccessDeniedException,
OperationNotSupportedException, OperationInProgressException, ResourceUnavailableException, AwsServiceException,
SdkClientException, WorkSpacesException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
MigrateWorkspaceResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(migrateWorkspaceRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, migrateWorkspaceRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "WorkSpaces");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "MigrateWorkspace");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("MigrateWorkspace").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(migrateWorkspaceRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new MigrateWorkspaceRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Modifies the configuration of Bring Your Own License (BYOL) for the specified account.
*
*
* @param modifyAccountRequest
* @return Result of the ModifyAccount operation returned by the service.
* @throws InvalidParameterValuesException
* One or more parameter values are not valid.
* @throws AccessDeniedException
* The user is not authorized to access a resource.
* @throws InvalidResourceStateException
* The state of the resource is not valid for this operation.
* @throws ResourceUnavailableException
* The specified resource is not available.
* @throws ResourceNotFoundException
* The resource could not be found.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws WorkSpacesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample WorkSpacesClient.ModifyAccount
* @see AWS API
* Documentation
*/
@Override
public ModifyAccountResponse modifyAccount(ModifyAccountRequest modifyAccountRequest) throws InvalidParameterValuesException,
AccessDeniedException, InvalidResourceStateException, ResourceUnavailableException, ResourceNotFoundException,
AwsServiceException, SdkClientException, WorkSpacesException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata,
ModifyAccountResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(modifyAccountRequest, this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, modifyAccountRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "WorkSpaces");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ModifyAccount");
return clientHandler.execute(new ClientExecutionParams()
.withOperationName("ModifyAccount").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(modifyAccountRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ModifyAccountRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Modifies the properties of the certificate-based authentication you want to use with your WorkSpaces.
*
*
* @param modifyCertificateBasedAuthPropertiesRequest
* @return Result of the ModifyCertificateBasedAuthProperties operation returned by the service.
* @throws AccessDeniedException
* The user is not authorized to access a resource.
* @throws InvalidParameterValuesException
* One or more parameter values are not valid.
* @throws OperationNotSupportedException
* This operation is not supported.
* @throws ResourceNotFoundException
* The resource could not be found.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws WorkSpacesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample WorkSpacesClient.ModifyCertificateBasedAuthProperties
* @see AWS API Documentation
*/
@Override
public ModifyCertificateBasedAuthPropertiesResponse modifyCertificateBasedAuthProperties(
ModifyCertificateBasedAuthPropertiesRequest modifyCertificateBasedAuthPropertiesRequest)
throws AccessDeniedException, InvalidParameterValuesException, OperationNotSupportedException,
ResourceNotFoundException, AwsServiceException, SdkClientException, WorkSpacesException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory
.createResponseHandler(operationMetadata, ModifyCertificateBasedAuthPropertiesResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(modifyCertificateBasedAuthPropertiesRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration,
modifyCertificateBasedAuthPropertiesRequest.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "WorkSpaces");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ModifyCertificateBasedAuthProperties");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("ModifyCertificateBasedAuthProperties").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(modifyCertificateBasedAuthPropertiesRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ModifyCertificateBasedAuthPropertiesRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Modifies the properties of the specified Amazon WorkSpaces clients.
*
*
* @param modifyClientPropertiesRequest
* @return Result of the ModifyClientProperties operation returned by the service.
* @throws InvalidParameterValuesException
* One or more parameter values are not valid.
* @throws ResourceNotFoundException
* The resource could not be found.
* @throws AccessDeniedException
* The user is not authorized to access a resource.
* @throws OperationNotSupportedException
* This operation is not supported.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws WorkSpacesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample WorkSpacesClient.ModifyClientProperties
* @see AWS API Documentation
*/
@Override
public ModifyClientPropertiesResponse modifyClientProperties(ModifyClientPropertiesRequest modifyClientPropertiesRequest)
throws InvalidParameterValuesException, ResourceNotFoundException, AccessDeniedException,
OperationNotSupportedException, AwsServiceException, SdkClientException, WorkSpacesException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, ModifyClientPropertiesResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(modifyClientPropertiesRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, modifyClientPropertiesRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "WorkSpaces");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ModifyClientProperties");
return clientHandler
.execute(new ClientExecutionParams()
.withOperationName("ModifyClientProperties").withProtocolMetadata(protocolMetadata)
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withRequestConfiguration(clientConfiguration).withInput(modifyClientPropertiesRequest)
.withMetricCollector(apiCallMetricCollector)
.withMarshaller(new ModifyClientPropertiesRequestMarshaller(protocolFactory)));
} finally {
metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));
}
}
/**
*
* Modifies multiple properties related to SAML 2.0 authentication, including the enablement status, user access
* URL, and relay state parameter name that are used for configuring federation with an SAML 2.0 identity provider.
*
*
* @param modifySamlPropertiesRequest
* @return Result of the ModifySamlProperties operation returned by the service.
* @throws AccessDeniedException
* The user is not authorized to access a resource.
* @throws InvalidParameterValuesException
* One or more parameter values are not valid.
* @throws OperationNotSupportedException
* This operation is not supported.
* @throws ResourceNotFoundException
* The resource could not be found.
* @throws SdkException
* Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException
* If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws WorkSpacesException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample WorkSpacesClient.ModifySamlProperties
* @see AWS API Documentation
*/
@Override
public ModifySamlPropertiesResponse modifySamlProperties(ModifySamlPropertiesRequest modifySamlPropertiesRequest)
throws AccessDeniedException, InvalidParameterValuesException, OperationNotSupportedException,
ResourceNotFoundException, AwsServiceException, SdkClientException, WorkSpacesException {
JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)
.isPayloadJson(true).build();
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
operationMetadata, ModifySamlPropertiesResponse::builder);
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory,
operationMetadata);
SdkClientConfiguration clientConfiguration = updateSdkClientConfiguration(modifySamlPropertiesRequest,
this.clientConfiguration);
List metricPublishers = resolveMetricPublishers(clientConfiguration, modifySamlPropertiesRequest
.overrideConfiguration().orElse(null));
MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector
.create("ApiCall");
try {
apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "WorkSpaces");
apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ModifySamlProperties");
return clientHandler.execute(new ClientExecutionParams