Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
10385 lines (8947 sloc) 349 KB
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package workdocs
import (
"fmt"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awsutil"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/private/protocol"
"github.com/aws/aws-sdk-go/private/protocol/restjson"
)
const opAbortDocumentVersionUpload = "AbortDocumentVersionUpload"
// AbortDocumentVersionUploadRequest generates a "aws/request.Request" representing the
// client's request for the AbortDocumentVersionUpload operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See AbortDocumentVersionUpload for more information on using the AbortDocumentVersionUpload
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the AbortDocumentVersionUploadRequest method.
// req, resp := client.AbortDocumentVersionUploadRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/AbortDocumentVersionUpload
func (c *WorkDocs) AbortDocumentVersionUploadRequest(input *AbortDocumentVersionUploadInput) (req *request.Request, output *AbortDocumentVersionUploadOutput) {
op := &request.Operation{
Name: opAbortDocumentVersionUpload,
HTTPMethod: "DELETE",
HTTPPath: "/api/v1/documents/{DocumentId}/versions/{VersionId}",
}
if input == nil {
input = &AbortDocumentVersionUploadInput{}
}
output = &AbortDocumentVersionUploadOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// AbortDocumentVersionUpload API operation for Amazon WorkDocs.
//
// Aborts the upload of the specified document version that was previously initiated
// by InitiateDocumentVersionUpload. The client should make this call only when
// it no longer intends to upload the document version, or fails to do so.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon WorkDocs's
// API operation AbortDocumentVersionUpload for usage and error information.
//
// Returned Error Codes:
// * ErrCodeEntityNotExistsException "EntityNotExistsException"
// The resource does not exist.
//
// * ErrCodeProhibitedStateException "ProhibitedStateException"
// The specified document version is not in the INITIALIZED state.
//
// * ErrCodeUnauthorizedOperationException "UnauthorizedOperationException"
// The operation is not permitted.
//
// * ErrCodeUnauthorizedResourceAccessException "UnauthorizedResourceAccessException"
// The caller does not have access to perform the action on the resource.
//
// * ErrCodeFailedDependencyException "FailedDependencyException"
// The AWS Directory Service cannot reach an on-premises instance. Or a dependency
// under the control of the organization is failing, such as a connected Active
// Directory.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// One or more of the dependencies is unavailable.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/AbortDocumentVersionUpload
func (c *WorkDocs) AbortDocumentVersionUpload(input *AbortDocumentVersionUploadInput) (*AbortDocumentVersionUploadOutput, error) {
req, out := c.AbortDocumentVersionUploadRequest(input)
return out, req.Send()
}
// AbortDocumentVersionUploadWithContext is the same as AbortDocumentVersionUpload with the addition of
// the ability to pass a context and additional request options.
//
// See AbortDocumentVersionUpload for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *WorkDocs) AbortDocumentVersionUploadWithContext(ctx aws.Context, input *AbortDocumentVersionUploadInput, opts ...request.Option) (*AbortDocumentVersionUploadOutput, error) {
req, out := c.AbortDocumentVersionUploadRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opActivateUser = "ActivateUser"
// ActivateUserRequest generates a "aws/request.Request" representing the
// client's request for the ActivateUser operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See ActivateUser for more information on using the ActivateUser
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the ActivateUserRequest method.
// req, resp := client.ActivateUserRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/ActivateUser
func (c *WorkDocs) ActivateUserRequest(input *ActivateUserInput) (req *request.Request, output *ActivateUserOutput) {
op := &request.Operation{
Name: opActivateUser,
HTTPMethod: "POST",
HTTPPath: "/api/v1/users/{UserId}/activation",
}
if input == nil {
input = &ActivateUserInput{}
}
output = &ActivateUserOutput{}
req = c.newRequest(op, input, output)
return
}
// ActivateUser API operation for Amazon WorkDocs.
//
// Activates the specified user. Only active users can access Amazon WorkDocs.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon WorkDocs's
// API operation ActivateUser for usage and error information.
//
// Returned Error Codes:
// * ErrCodeEntityNotExistsException "EntityNotExistsException"
// The resource does not exist.
//
// * ErrCodeUnauthorizedOperationException "UnauthorizedOperationException"
// The operation is not permitted.
//
// * ErrCodeUnauthorizedResourceAccessException "UnauthorizedResourceAccessException"
// The caller does not have access to perform the action on the resource.
//
// * ErrCodeFailedDependencyException "FailedDependencyException"
// The AWS Directory Service cannot reach an on-premises instance. Or a dependency
// under the control of the organization is failing, such as a connected Active
// Directory.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// One or more of the dependencies is unavailable.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/ActivateUser
func (c *WorkDocs) ActivateUser(input *ActivateUserInput) (*ActivateUserOutput, error) {
req, out := c.ActivateUserRequest(input)
return out, req.Send()
}
// ActivateUserWithContext is the same as ActivateUser with the addition of
// the ability to pass a context and additional request options.
//
// See ActivateUser for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *WorkDocs) ActivateUserWithContext(ctx aws.Context, input *ActivateUserInput, opts ...request.Option) (*ActivateUserOutput, error) {
req, out := c.ActivateUserRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opAddResourcePermissions = "AddResourcePermissions"
// AddResourcePermissionsRequest generates a "aws/request.Request" representing the
// client's request for the AddResourcePermissions operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See AddResourcePermissions for more information on using the AddResourcePermissions
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the AddResourcePermissionsRequest method.
// req, resp := client.AddResourcePermissionsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/AddResourcePermissions
func (c *WorkDocs) AddResourcePermissionsRequest(input *AddResourcePermissionsInput) (req *request.Request, output *AddResourcePermissionsOutput) {
op := &request.Operation{
Name: opAddResourcePermissions,
HTTPMethod: "POST",
HTTPPath: "/api/v1/resources/{ResourceId}/permissions",
}
if input == nil {
input = &AddResourcePermissionsInput{}
}
output = &AddResourcePermissionsOutput{}
req = c.newRequest(op, input, output)
return
}
// AddResourcePermissions API operation for Amazon WorkDocs.
//
// Creates a set of permissions for the specified folder or document. The resource
// permissions are overwritten if the principals already have different permissions.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon WorkDocs's
// API operation AddResourcePermissions for usage and error information.
//
// Returned Error Codes:
// * ErrCodeUnauthorizedOperationException "UnauthorizedOperationException"
// The operation is not permitted.
//
// * ErrCodeUnauthorizedResourceAccessException "UnauthorizedResourceAccessException"
// The caller does not have access to perform the action on the resource.
//
// * ErrCodeFailedDependencyException "FailedDependencyException"
// The AWS Directory Service cannot reach an on-premises instance. Or a dependency
// under the control of the organization is failing, such as a connected Active
// Directory.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// One or more of the dependencies is unavailable.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/AddResourcePermissions
func (c *WorkDocs) AddResourcePermissions(input *AddResourcePermissionsInput) (*AddResourcePermissionsOutput, error) {
req, out := c.AddResourcePermissionsRequest(input)
return out, req.Send()
}
// AddResourcePermissionsWithContext is the same as AddResourcePermissions with the addition of
// the ability to pass a context and additional request options.
//
// See AddResourcePermissions for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *WorkDocs) AddResourcePermissionsWithContext(ctx aws.Context, input *AddResourcePermissionsInput, opts ...request.Option) (*AddResourcePermissionsOutput, error) {
req, out := c.AddResourcePermissionsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opCreateComment = "CreateComment"
// CreateCommentRequest generates a "aws/request.Request" representing the
// client's request for the CreateComment operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See CreateComment for more information on using the CreateComment
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the CreateCommentRequest method.
// req, resp := client.CreateCommentRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/CreateComment
func (c *WorkDocs) CreateCommentRequest(input *CreateCommentInput) (req *request.Request, output *CreateCommentOutput) {
op := &request.Operation{
Name: opCreateComment,
HTTPMethod: "POST",
HTTPPath: "/api/v1/documents/{DocumentId}/versions/{VersionId}/comment",
}
if input == nil {
input = &CreateCommentInput{}
}
output = &CreateCommentOutput{}
req = c.newRequest(op, input, output)
return
}
// CreateComment API operation for Amazon WorkDocs.
//
// Adds a new comment to the specified document version.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon WorkDocs's
// API operation CreateComment for usage and error information.
//
// Returned Error Codes:
// * ErrCodeEntityNotExistsException "EntityNotExistsException"
// The resource does not exist.
//
// * ErrCodeProhibitedStateException "ProhibitedStateException"
// The specified document version is not in the INITIALIZED state.
//
// * ErrCodeUnauthorizedOperationException "UnauthorizedOperationException"
// The operation is not permitted.
//
// * ErrCodeUnauthorizedResourceAccessException "UnauthorizedResourceAccessException"
// The caller does not have access to perform the action on the resource.
//
// * ErrCodeFailedDependencyException "FailedDependencyException"
// The AWS Directory Service cannot reach an on-premises instance. Or a dependency
// under the control of the organization is failing, such as a connected Active
// Directory.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// One or more of the dependencies is unavailable.
//
// * ErrCodeDocumentLockedForCommentsException "DocumentLockedForCommentsException"
// This exception is thrown when the document is locked for comments and user
// tries to create or delete a comment on that document.
//
// * ErrCodeInvalidCommentOperationException "InvalidCommentOperationException"
// The requested operation is not allowed on the specified comment object.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/CreateComment
func (c *WorkDocs) CreateComment(input *CreateCommentInput) (*CreateCommentOutput, error) {
req, out := c.CreateCommentRequest(input)
return out, req.Send()
}
// CreateCommentWithContext is the same as CreateComment with the addition of
// the ability to pass a context and additional request options.
//
// See CreateComment for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *WorkDocs) CreateCommentWithContext(ctx aws.Context, input *CreateCommentInput, opts ...request.Option) (*CreateCommentOutput, error) {
req, out := c.CreateCommentRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opCreateCustomMetadata = "CreateCustomMetadata"
// CreateCustomMetadataRequest generates a "aws/request.Request" representing the
// client's request for the CreateCustomMetadata operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See CreateCustomMetadata for more information on using the CreateCustomMetadata
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the CreateCustomMetadataRequest method.
// req, resp := client.CreateCustomMetadataRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/CreateCustomMetadata
func (c *WorkDocs) CreateCustomMetadataRequest(input *CreateCustomMetadataInput) (req *request.Request, output *CreateCustomMetadataOutput) {
op := &request.Operation{
Name: opCreateCustomMetadata,
HTTPMethod: "PUT",
HTTPPath: "/api/v1/resources/{ResourceId}/customMetadata",
}
if input == nil {
input = &CreateCustomMetadataInput{}
}
output = &CreateCustomMetadataOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// CreateCustomMetadata API operation for Amazon WorkDocs.
//
// Adds one or more custom properties to the specified resource (a folder, document,
// or version).
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon WorkDocs's
// API operation CreateCustomMetadata for usage and error information.
//
// Returned Error Codes:
// * ErrCodeEntityNotExistsException "EntityNotExistsException"
// The resource does not exist.
//
// * ErrCodeUnauthorizedOperationException "UnauthorizedOperationException"
// The operation is not permitted.
//
// * ErrCodeUnauthorizedResourceAccessException "UnauthorizedResourceAccessException"
// The caller does not have access to perform the action on the resource.
//
// * ErrCodeProhibitedStateException "ProhibitedStateException"
// The specified document version is not in the INITIALIZED state.
//
// * ErrCodeCustomMetadataLimitExceededException "CustomMetadataLimitExceededException"
// The limit has been reached on the number of custom properties for the specified
// resource.
//
// * ErrCodeFailedDependencyException "FailedDependencyException"
// The AWS Directory Service cannot reach an on-premises instance. Or a dependency
// under the control of the organization is failing, such as a connected Active
// Directory.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// One or more of the dependencies is unavailable.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/CreateCustomMetadata
func (c *WorkDocs) CreateCustomMetadata(input *CreateCustomMetadataInput) (*CreateCustomMetadataOutput, error) {
req, out := c.CreateCustomMetadataRequest(input)
return out, req.Send()
}
// CreateCustomMetadataWithContext is the same as CreateCustomMetadata with the addition of
// the ability to pass a context and additional request options.
//
// See CreateCustomMetadata for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *WorkDocs) CreateCustomMetadataWithContext(ctx aws.Context, input *CreateCustomMetadataInput, opts ...request.Option) (*CreateCustomMetadataOutput, error) {
req, out := c.CreateCustomMetadataRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opCreateFolder = "CreateFolder"
// CreateFolderRequest generates a "aws/request.Request" representing the
// client's request for the CreateFolder operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See CreateFolder for more information on using the CreateFolder
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the CreateFolderRequest method.
// req, resp := client.CreateFolderRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/CreateFolder
func (c *WorkDocs) CreateFolderRequest(input *CreateFolderInput) (req *request.Request, output *CreateFolderOutput) {
op := &request.Operation{
Name: opCreateFolder,
HTTPMethod: "POST",
HTTPPath: "/api/v1/folders",
}
if input == nil {
input = &CreateFolderInput{}
}
output = &CreateFolderOutput{}
req = c.newRequest(op, input, output)
return
}
// CreateFolder API operation for Amazon WorkDocs.
//
// Creates a folder with the specified name and parent folder.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon WorkDocs's
// API operation CreateFolder for usage and error information.
//
// Returned Error Codes:
// * ErrCodeEntityNotExistsException "EntityNotExistsException"
// The resource does not exist.
//
// * ErrCodeEntityAlreadyExistsException "EntityAlreadyExistsException"
// The resource already exists.
//
// * ErrCodeProhibitedStateException "ProhibitedStateException"
// The specified document version is not in the INITIALIZED state.
//
// * ErrCodeConflictingOperationException "ConflictingOperationException"
// Another operation is in progress on the resource that conflicts with the
// current operation.
//
// * ErrCodeLimitExceededException "LimitExceededException"
// The maximum of 100,000 folders under the parent folder has been exceeded.
//
// * ErrCodeUnauthorizedOperationException "UnauthorizedOperationException"
// The operation is not permitted.
//
// * ErrCodeUnauthorizedResourceAccessException "UnauthorizedResourceAccessException"
// The caller does not have access to perform the action on the resource.
//
// * ErrCodeFailedDependencyException "FailedDependencyException"
// The AWS Directory Service cannot reach an on-premises instance. Or a dependency
// under the control of the organization is failing, such as a connected Active
// Directory.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// One or more of the dependencies is unavailable.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/CreateFolder
func (c *WorkDocs) CreateFolder(input *CreateFolderInput) (*CreateFolderOutput, error) {
req, out := c.CreateFolderRequest(input)
return out, req.Send()
}
// CreateFolderWithContext is the same as CreateFolder with the addition of
// the ability to pass a context and additional request options.
//
// See CreateFolder for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *WorkDocs) CreateFolderWithContext(ctx aws.Context, input *CreateFolderInput, opts ...request.Option) (*CreateFolderOutput, error) {
req, out := c.CreateFolderRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opCreateLabels = "CreateLabels"
// CreateLabelsRequest generates a "aws/request.Request" representing the
// client's request for the CreateLabels operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See CreateLabels for more information on using the CreateLabels
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the CreateLabelsRequest method.
// req, resp := client.CreateLabelsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/CreateLabels
func (c *WorkDocs) CreateLabelsRequest(input *CreateLabelsInput) (req *request.Request, output *CreateLabelsOutput) {
op := &request.Operation{
Name: opCreateLabels,
HTTPMethod: "PUT",
HTTPPath: "/api/v1/resources/{ResourceId}/labels",
}
if input == nil {
input = &CreateLabelsInput{}
}
output = &CreateLabelsOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// CreateLabels API operation for Amazon WorkDocs.
//
// Adds the specified list of labels to the given resource (a document or folder)
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon WorkDocs's
// API operation CreateLabels for usage and error information.
//
// Returned Error Codes:
// * ErrCodeEntityNotExistsException "EntityNotExistsException"
// The resource does not exist.
//
// * ErrCodeUnauthorizedOperationException "UnauthorizedOperationException"
// The operation is not permitted.
//
// * ErrCodeUnauthorizedResourceAccessException "UnauthorizedResourceAccessException"
// The caller does not have access to perform the action on the resource.
//
// * ErrCodeFailedDependencyException "FailedDependencyException"
// The AWS Directory Service cannot reach an on-premises instance. Or a dependency
// under the control of the organization is failing, such as a connected Active
// Directory.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// One or more of the dependencies is unavailable.
//
// * ErrCodeTooManyLabelsException "TooManyLabelsException"
// The limit has been reached on the number of labels for the specified resource.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/CreateLabels
func (c *WorkDocs) CreateLabels(input *CreateLabelsInput) (*CreateLabelsOutput, error) {
req, out := c.CreateLabelsRequest(input)
return out, req.Send()
}
// CreateLabelsWithContext is the same as CreateLabels with the addition of
// the ability to pass a context and additional request options.
//
// See CreateLabels for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *WorkDocs) CreateLabelsWithContext(ctx aws.Context, input *CreateLabelsInput, opts ...request.Option) (*CreateLabelsOutput, error) {
req, out := c.CreateLabelsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opCreateNotificationSubscription = "CreateNotificationSubscription"
// CreateNotificationSubscriptionRequest generates a "aws/request.Request" representing the
// client's request for the CreateNotificationSubscription operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See CreateNotificationSubscription for more information on using the CreateNotificationSubscription
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the CreateNotificationSubscriptionRequest method.
// req, resp := client.CreateNotificationSubscriptionRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/CreateNotificationSubscription
func (c *WorkDocs) CreateNotificationSubscriptionRequest(input *CreateNotificationSubscriptionInput) (req *request.Request, output *CreateNotificationSubscriptionOutput) {
op := &request.Operation{
Name: opCreateNotificationSubscription,
HTTPMethod: "POST",
HTTPPath: "/api/v1/organizations/{OrganizationId}/subscriptions",
}
if input == nil {
input = &CreateNotificationSubscriptionInput{}
}
output = &CreateNotificationSubscriptionOutput{}
req = c.newRequest(op, input, output)
return
}
// CreateNotificationSubscription API operation for Amazon WorkDocs.
//
// Configure Amazon WorkDocs to use Amazon SNS notifications. The endpoint receives
// a confirmation message, and must confirm the subscription.
//
// For more information, see Subscribe to Notifications (https://docs.aws.amazon.com/workdocs/latest/developerguide/subscribe-notifications.html)
// in the Amazon WorkDocs Developer Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon WorkDocs's
// API operation CreateNotificationSubscription for usage and error information.
//
// Returned Error Codes:
// * ErrCodeUnauthorizedResourceAccessException "UnauthorizedResourceAccessException"
// The caller does not have access to perform the action on the resource.
//
// * ErrCodeTooManySubscriptionsException "TooManySubscriptionsException"
// You've reached the limit on the number of subscriptions for the WorkDocs
// instance.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// One or more of the dependencies is unavailable.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/CreateNotificationSubscription
func (c *WorkDocs) CreateNotificationSubscription(input *CreateNotificationSubscriptionInput) (*CreateNotificationSubscriptionOutput, error) {
req, out := c.CreateNotificationSubscriptionRequest(input)
return out, req.Send()
}
// CreateNotificationSubscriptionWithContext is the same as CreateNotificationSubscription with the addition of
// the ability to pass a context and additional request options.
//
// See CreateNotificationSubscription for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *WorkDocs) CreateNotificationSubscriptionWithContext(ctx aws.Context, input *CreateNotificationSubscriptionInput, opts ...request.Option) (*CreateNotificationSubscriptionOutput, error) {
req, out := c.CreateNotificationSubscriptionRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opCreateUser = "CreateUser"
// CreateUserRequest generates a "aws/request.Request" representing the
// client's request for the CreateUser operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See CreateUser for more information on using the CreateUser
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the CreateUserRequest method.
// req, resp := client.CreateUserRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/CreateUser
func (c *WorkDocs) CreateUserRequest(input *CreateUserInput) (req *request.Request, output *CreateUserOutput) {
op := &request.Operation{
Name: opCreateUser,
HTTPMethod: "POST",
HTTPPath: "/api/v1/users",
}
if input == nil {
input = &CreateUserInput{}
}
output = &CreateUserOutput{}
req = c.newRequest(op, input, output)
return
}
// CreateUser API operation for Amazon WorkDocs.
//
// Creates a user in a Simple AD or Microsoft AD directory. The status of a
// newly created user is "ACTIVE". New users can access Amazon WorkDocs.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon WorkDocs's
// API operation CreateUser for usage and error information.
//
// Returned Error Codes:
// * ErrCodeEntityAlreadyExistsException "EntityAlreadyExistsException"
// The resource already exists.
//
// * ErrCodeUnauthorizedOperationException "UnauthorizedOperationException"
// The operation is not permitted.
//
// * ErrCodeUnauthorizedResourceAccessException "UnauthorizedResourceAccessException"
// The caller does not have access to perform the action on the resource.
//
// * ErrCodeFailedDependencyException "FailedDependencyException"
// The AWS Directory Service cannot reach an on-premises instance. Or a dependency
// under the control of the organization is failing, such as a connected Active
// Directory.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// One or more of the dependencies is unavailable.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/CreateUser
func (c *WorkDocs) CreateUser(input *CreateUserInput) (*CreateUserOutput, error) {
req, out := c.CreateUserRequest(input)
return out, req.Send()
}
// CreateUserWithContext is the same as CreateUser with the addition of
// the ability to pass a context and additional request options.
//
// See CreateUser for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *WorkDocs) CreateUserWithContext(ctx aws.Context, input *CreateUserInput, opts ...request.Option) (*CreateUserOutput, error) {
req, out := c.CreateUserRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeactivateUser = "DeactivateUser"
// DeactivateUserRequest generates a "aws/request.Request" representing the
// client's request for the DeactivateUser operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeactivateUser for more information on using the DeactivateUser
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DeactivateUserRequest method.
// req, resp := client.DeactivateUserRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeactivateUser
func (c *WorkDocs) DeactivateUserRequest(input *DeactivateUserInput) (req *request.Request, output *DeactivateUserOutput) {
op := &request.Operation{
Name: opDeactivateUser,
HTTPMethod: "DELETE",
HTTPPath: "/api/v1/users/{UserId}/activation",
}
if input == nil {
input = &DeactivateUserInput{}
}
output = &DeactivateUserOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// DeactivateUser API operation for Amazon WorkDocs.
//
// Deactivates the specified user, which revokes the user's access to Amazon
// WorkDocs.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon WorkDocs's
// API operation DeactivateUser for usage and error information.
//
// Returned Error Codes:
// * ErrCodeEntityNotExistsException "EntityNotExistsException"
// The resource does not exist.
//
// * ErrCodeUnauthorizedOperationException "UnauthorizedOperationException"
// The operation is not permitted.
//
// * ErrCodeUnauthorizedResourceAccessException "UnauthorizedResourceAccessException"
// The caller does not have access to perform the action on the resource.
//
// * ErrCodeFailedDependencyException "FailedDependencyException"
// The AWS Directory Service cannot reach an on-premises instance. Or a dependency
// under the control of the organization is failing, such as a connected Active
// Directory.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// One or more of the dependencies is unavailable.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeactivateUser
func (c *WorkDocs) DeactivateUser(input *DeactivateUserInput) (*DeactivateUserOutput, error) {
req, out := c.DeactivateUserRequest(input)
return out, req.Send()
}
// DeactivateUserWithContext is the same as DeactivateUser with the addition of
// the ability to pass a context and additional request options.
//
// See DeactivateUser for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *WorkDocs) DeactivateUserWithContext(ctx aws.Context, input *DeactivateUserInput, opts ...request.Option) (*DeactivateUserOutput, error) {
req, out := c.DeactivateUserRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteComment = "DeleteComment"
// DeleteCommentRequest generates a "aws/request.Request" representing the
// client's request for the DeleteComment operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeleteComment for more information on using the DeleteComment
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DeleteCommentRequest method.
// req, resp := client.DeleteCommentRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeleteComment
func (c *WorkDocs) DeleteCommentRequest(input *DeleteCommentInput) (req *request.Request, output *DeleteCommentOutput) {
op := &request.Operation{
Name: opDeleteComment,
HTTPMethod: "DELETE",
HTTPPath: "/api/v1/documents/{DocumentId}/versions/{VersionId}/comment/{CommentId}",
}
if input == nil {
input = &DeleteCommentInput{}
}
output = &DeleteCommentOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// DeleteComment API operation for Amazon WorkDocs.
//
// Deletes the specified comment from the document version.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon WorkDocs's
// API operation DeleteComment for usage and error information.
//
// Returned Error Codes:
// * ErrCodeEntityNotExistsException "EntityNotExistsException"
// The resource does not exist.
//
// * ErrCodeProhibitedStateException "ProhibitedStateException"
// The specified document version is not in the INITIALIZED state.
//
// * ErrCodeUnauthorizedOperationException "UnauthorizedOperationException"
// The operation is not permitted.
//
// * ErrCodeUnauthorizedResourceAccessException "UnauthorizedResourceAccessException"
// The caller does not have access to perform the action on the resource.
//
// * ErrCodeFailedDependencyException "FailedDependencyException"
// The AWS Directory Service cannot reach an on-premises instance. Or a dependency
// under the control of the organization is failing, such as a connected Active
// Directory.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// One or more of the dependencies is unavailable.
//
// * ErrCodeDocumentLockedForCommentsException "DocumentLockedForCommentsException"
// This exception is thrown when the document is locked for comments and user
// tries to create or delete a comment on that document.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeleteComment
func (c *WorkDocs) DeleteComment(input *DeleteCommentInput) (*DeleteCommentOutput, error) {
req, out := c.DeleteCommentRequest(input)
return out, req.Send()
}
// DeleteCommentWithContext is the same as DeleteComment with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteComment for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *WorkDocs) DeleteCommentWithContext(ctx aws.Context, input *DeleteCommentInput, opts ...request.Option) (*DeleteCommentOutput, error) {
req, out := c.DeleteCommentRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteCustomMetadata = "DeleteCustomMetadata"
// DeleteCustomMetadataRequest generates a "aws/request.Request" representing the
// client's request for the DeleteCustomMetadata operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeleteCustomMetadata for more information on using the DeleteCustomMetadata
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DeleteCustomMetadataRequest method.
// req, resp := client.DeleteCustomMetadataRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeleteCustomMetadata
func (c *WorkDocs) DeleteCustomMetadataRequest(input *DeleteCustomMetadataInput) (req *request.Request, output *DeleteCustomMetadataOutput) {
op := &request.Operation{
Name: opDeleteCustomMetadata,
HTTPMethod: "DELETE",
HTTPPath: "/api/v1/resources/{ResourceId}/customMetadata",
}
if input == nil {
input = &DeleteCustomMetadataInput{}
}
output = &DeleteCustomMetadataOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// DeleteCustomMetadata API operation for Amazon WorkDocs.
//
// Deletes custom metadata from the specified resource.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon WorkDocs's
// API operation DeleteCustomMetadata for usage and error information.
//
// Returned Error Codes:
// * ErrCodeEntityNotExistsException "EntityNotExistsException"
// The resource does not exist.
//
// * ErrCodeUnauthorizedOperationException "UnauthorizedOperationException"
// The operation is not permitted.
//
// * ErrCodeUnauthorizedResourceAccessException "UnauthorizedResourceAccessException"
// The caller does not have access to perform the action on the resource.
//
// * ErrCodeProhibitedStateException "ProhibitedStateException"
// The specified document version is not in the INITIALIZED state.
//
// * ErrCodeFailedDependencyException "FailedDependencyException"
// The AWS Directory Service cannot reach an on-premises instance. Or a dependency
// under the control of the organization is failing, such as a connected Active
// Directory.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// One or more of the dependencies is unavailable.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeleteCustomMetadata
func (c *WorkDocs) DeleteCustomMetadata(input *DeleteCustomMetadataInput) (*DeleteCustomMetadataOutput, error) {
req, out := c.DeleteCustomMetadataRequest(input)
return out, req.Send()
}
// DeleteCustomMetadataWithContext is the same as DeleteCustomMetadata with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteCustomMetadata for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *WorkDocs) DeleteCustomMetadataWithContext(ctx aws.Context, input *DeleteCustomMetadataInput, opts ...request.Option) (*DeleteCustomMetadataOutput, error) {
req, out := c.DeleteCustomMetadataRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteDocument = "DeleteDocument"
// DeleteDocumentRequest generates a "aws/request.Request" representing the
// client's request for the DeleteDocument operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeleteDocument for more information on using the DeleteDocument
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DeleteDocumentRequest method.
// req, resp := client.DeleteDocumentRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeleteDocument
func (c *WorkDocs) DeleteDocumentRequest(input *DeleteDocumentInput) (req *request.Request, output *DeleteDocumentOutput) {
op := &request.Operation{
Name: opDeleteDocument,
HTTPMethod: "DELETE",
HTTPPath: "/api/v1/documents/{DocumentId}",
}
if input == nil {
input = &DeleteDocumentInput{}
}
output = &DeleteDocumentOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// DeleteDocument API operation for Amazon WorkDocs.
//
// Permanently deletes the specified document and its associated metadata.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon WorkDocs's
// API operation DeleteDocument for usage and error information.
//
// Returned Error Codes:
// * ErrCodeEntityNotExistsException "EntityNotExistsException"
// The resource does not exist.
//
// * ErrCodeProhibitedStateException "ProhibitedStateException"
// The specified document version is not in the INITIALIZED state.
//
// * ErrCodeConflictingOperationException "ConflictingOperationException"
// Another operation is in progress on the resource that conflicts with the
// current operation.
//
// * ErrCodeConcurrentModificationException "ConcurrentModificationException"
// The resource hierarchy is changing.
//
// * ErrCodeUnauthorizedOperationException "UnauthorizedOperationException"
// The operation is not permitted.
//
// * ErrCodeUnauthorizedResourceAccessException "UnauthorizedResourceAccessException"
// The caller does not have access to perform the action on the resource.
//
// * ErrCodeFailedDependencyException "FailedDependencyException"
// The AWS Directory Service cannot reach an on-premises instance. Or a dependency
// under the control of the organization is failing, such as a connected Active
// Directory.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// One or more of the dependencies is unavailable.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeleteDocument
func (c *WorkDocs) DeleteDocument(input *DeleteDocumentInput) (*DeleteDocumentOutput, error) {
req, out := c.DeleteDocumentRequest(input)
return out, req.Send()
}
// DeleteDocumentWithContext is the same as DeleteDocument with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteDocument for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *WorkDocs) DeleteDocumentWithContext(ctx aws.Context, input *DeleteDocumentInput, opts ...request.Option) (*DeleteDocumentOutput, error) {
req, out := c.DeleteDocumentRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteFolder = "DeleteFolder"
// DeleteFolderRequest generates a "aws/request.Request" representing the
// client's request for the DeleteFolder operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeleteFolder for more information on using the DeleteFolder
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DeleteFolderRequest method.
// req, resp := client.DeleteFolderRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeleteFolder
func (c *WorkDocs) DeleteFolderRequest(input *DeleteFolderInput) (req *request.Request, output *DeleteFolderOutput) {
op := &request.Operation{
Name: opDeleteFolder,
HTTPMethod: "DELETE",
HTTPPath: "/api/v1/folders/{FolderId}",
}
if input == nil {
input = &DeleteFolderInput{}
}
output = &DeleteFolderOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// DeleteFolder API operation for Amazon WorkDocs.
//
// Permanently deletes the specified folder and its contents.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon WorkDocs's
// API operation DeleteFolder for usage and error information.
//
// Returned Error Codes:
// * ErrCodeEntityNotExistsException "EntityNotExistsException"
// The resource does not exist.
//
// * ErrCodeProhibitedStateException "ProhibitedStateException"
// The specified document version is not in the INITIALIZED state.
//
// * ErrCodeConflictingOperationException "ConflictingOperationException"
// Another operation is in progress on the resource that conflicts with the
// current operation.
//
// * ErrCodeConcurrentModificationException "ConcurrentModificationException"
// The resource hierarchy is changing.
//
// * ErrCodeUnauthorizedOperationException "UnauthorizedOperationException"
// The operation is not permitted.
//
// * ErrCodeUnauthorizedResourceAccessException "UnauthorizedResourceAccessException"
// The caller does not have access to perform the action on the resource.
//
// * ErrCodeFailedDependencyException "FailedDependencyException"
// The AWS Directory Service cannot reach an on-premises instance. Or a dependency
// under the control of the organization is failing, such as a connected Active
// Directory.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// One or more of the dependencies is unavailable.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeleteFolder
func (c *WorkDocs) DeleteFolder(input *DeleteFolderInput) (*DeleteFolderOutput, error) {
req, out := c.DeleteFolderRequest(input)
return out, req.Send()
}
// DeleteFolderWithContext is the same as DeleteFolder with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteFolder for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *WorkDocs) DeleteFolderWithContext(ctx aws.Context, input *DeleteFolderInput, opts ...request.Option) (*DeleteFolderOutput, error) {
req, out := c.DeleteFolderRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteFolderContents = "DeleteFolderContents"
// DeleteFolderContentsRequest generates a "aws/request.Request" representing the
// client's request for the DeleteFolderContents operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeleteFolderContents for more information on using the DeleteFolderContents
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DeleteFolderContentsRequest method.
// req, resp := client.DeleteFolderContentsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeleteFolderContents
func (c *WorkDocs) DeleteFolderContentsRequest(input *DeleteFolderContentsInput) (req *request.Request, output *DeleteFolderContentsOutput) {
op := &request.Operation{
Name: opDeleteFolderContents,
HTTPMethod: "DELETE",
HTTPPath: "/api/v1/folders/{FolderId}/contents",
}
if input == nil {
input = &DeleteFolderContentsInput{}
}
output = &DeleteFolderContentsOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// DeleteFolderContents API operation for Amazon WorkDocs.
//
// Deletes the contents of the specified folder.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon WorkDocs's
// API operation DeleteFolderContents for usage and error information.
//
// Returned Error Codes:
// * ErrCodeEntityNotExistsException "EntityNotExistsException"
// The resource does not exist.
//
// * ErrCodeProhibitedStateException "ProhibitedStateException"
// The specified document version is not in the INITIALIZED state.
//
// * ErrCodeConflictingOperationException "ConflictingOperationException"
// Another operation is in progress on the resource that conflicts with the
// current operation.
//
// * ErrCodeUnauthorizedOperationException "UnauthorizedOperationException"
// The operation is not permitted.
//
// * ErrCodeUnauthorizedResourceAccessException "UnauthorizedResourceAccessException"
// The caller does not have access to perform the action on the resource.
//
// * ErrCodeFailedDependencyException "FailedDependencyException"
// The AWS Directory Service cannot reach an on-premises instance. Or a dependency
// under the control of the organization is failing, such as a connected Active
// Directory.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// One or more of the dependencies is unavailable.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeleteFolderContents
func (c *WorkDocs) DeleteFolderContents(input *DeleteFolderContentsInput) (*DeleteFolderContentsOutput, error) {
req, out := c.DeleteFolderContentsRequest(input)
return out, req.Send()
}
// DeleteFolderContentsWithContext is the same as DeleteFolderContents with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteFolderContents for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *WorkDocs) DeleteFolderContentsWithContext(ctx aws.Context, input *DeleteFolderContentsInput, opts ...request.Option) (*DeleteFolderContentsOutput, error) {
req, out := c.DeleteFolderContentsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteLabels = "DeleteLabels"
// DeleteLabelsRequest generates a "aws/request.Request" representing the
// client's request for the DeleteLabels operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeleteLabels for more information on using the DeleteLabels
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DeleteLabelsRequest method.
// req, resp := client.DeleteLabelsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeleteLabels
func (c *WorkDocs) DeleteLabelsRequest(input *DeleteLabelsInput) (req *request.Request, output *DeleteLabelsOutput) {
op := &request.Operation{
Name: opDeleteLabels,
HTTPMethod: "DELETE",
HTTPPath: "/api/v1/resources/{ResourceId}/labels",
}
if input == nil {
input = &DeleteLabelsInput{}
}
output = &DeleteLabelsOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// DeleteLabels API operation for Amazon WorkDocs.
//
// Deletes the specified list of labels from a resource.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon WorkDocs's
// API operation DeleteLabels for usage and error information.
//
// Returned Error Codes:
// * ErrCodeEntityNotExistsException "EntityNotExistsException"
// The resource does not exist.
//
// * ErrCodeUnauthorizedOperationException "UnauthorizedOperationException"
// The operation is not permitted.
//
// * ErrCodeUnauthorizedResourceAccessException "UnauthorizedResourceAccessException"
// The caller does not have access to perform the action on the resource.
//
// * ErrCodeFailedDependencyException "FailedDependencyException"
// The AWS Directory Service cannot reach an on-premises instance. Or a dependency
// under the control of the organization is failing, such as a connected Active
// Directory.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// One or more of the dependencies is unavailable.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeleteLabels
func (c *WorkDocs) DeleteLabels(input *DeleteLabelsInput) (*DeleteLabelsOutput, error) {
req, out := c.DeleteLabelsRequest(input)
return out, req.Send()
}
// DeleteLabelsWithContext is the same as DeleteLabels with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteLabels for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *WorkDocs) DeleteLabelsWithContext(ctx aws.Context, input *DeleteLabelsInput, opts ...request.Option) (*DeleteLabelsOutput, error) {
req, out := c.DeleteLabelsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteNotificationSubscription = "DeleteNotificationSubscription"
// DeleteNotificationSubscriptionRequest generates a "aws/request.Request" representing the
// client's request for the DeleteNotificationSubscription operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeleteNotificationSubscription for more information on using the DeleteNotificationSubscription
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DeleteNotificationSubscriptionRequest method.
// req, resp := client.DeleteNotificationSubscriptionRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeleteNotificationSubscription
func (c *WorkDocs) DeleteNotificationSubscriptionRequest(input *DeleteNotificationSubscriptionInput) (req *request.Request, output *DeleteNotificationSubscriptionOutput) {
op := &request.Operation{
Name: opDeleteNotificationSubscription,
HTTPMethod: "DELETE",
HTTPPath: "/api/v1/organizations/{OrganizationId}/subscriptions/{SubscriptionId}",
}
if input == nil {
input = &DeleteNotificationSubscriptionInput{}
}
output = &DeleteNotificationSubscriptionOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// DeleteNotificationSubscription API operation for Amazon WorkDocs.
//
// Deletes the specified subscription from the specified organization.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon WorkDocs's
// API operation DeleteNotificationSubscription for usage and error information.
//
// Returned Error Codes:
// * ErrCodeUnauthorizedResourceAccessException "UnauthorizedResourceAccessException"
// The caller does not have access to perform the action on the resource.
//
// * ErrCodeEntityNotExistsException "EntityNotExistsException"
// The resource does not exist.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// One or more of the dependencies is unavailable.
//
// * ErrCodeProhibitedStateException "ProhibitedStateException"
// The specified document version is not in the INITIALIZED state.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeleteNotificationSubscription
func (c *WorkDocs) DeleteNotificationSubscription(input *DeleteNotificationSubscriptionInput) (*DeleteNotificationSubscriptionOutput, error) {
req, out := c.DeleteNotificationSubscriptionRequest(input)
return out, req.Send()
}
// DeleteNotificationSubscriptionWithContext is the same as DeleteNotificationSubscription with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteNotificationSubscription for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *WorkDocs) DeleteNotificationSubscriptionWithContext(ctx aws.Context, input *DeleteNotificationSubscriptionInput, opts ...request.Option) (*DeleteNotificationSubscriptionOutput, error) {
req, out := c.DeleteNotificationSubscriptionRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteUser = "DeleteUser"
// DeleteUserRequest generates a "aws/request.Request" representing the
// client's request for the DeleteUser operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeleteUser for more information on using the DeleteUser
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DeleteUserRequest method.
// req, resp := client.DeleteUserRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeleteUser
func (c *WorkDocs) DeleteUserRequest(input *DeleteUserInput) (req *request.Request, output *DeleteUserOutput) {
op := &request.Operation{
Name: opDeleteUser,
HTTPMethod: "DELETE",
HTTPPath: "/api/v1/users/{UserId}",
}
if input == nil {
input = &DeleteUserInput{}
}
output = &DeleteUserOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// DeleteUser API operation for Amazon WorkDocs.
//
// Deletes the specified user from a Simple AD or Microsoft AD directory.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon WorkDocs's
// API operation DeleteUser for usage and error information.
//
// Returned Error Codes:
// * ErrCodeEntityNotExistsException "EntityNotExistsException"
// The resource does not exist.
//
// * ErrCodeUnauthorizedOperationException "UnauthorizedOperationException"
// The operation is not permitted.
//
// * ErrCodeUnauthorizedResourceAccessException "UnauthorizedResourceAccessException"
// The caller does not have access to perform the action on the resource.
//
// * ErrCodeFailedDependencyException "FailedDependencyException"
// The AWS Directory Service cannot reach an on-premises instance. Or a dependency
// under the control of the organization is failing, such as a connected Active
// Directory.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// One or more of the dependencies is unavailable.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeleteUser
func (c *WorkDocs) DeleteUser(input *DeleteUserInput) (*DeleteUserOutput, error) {
req, out := c.DeleteUserRequest(input)
return out, req.Send()
}
// DeleteUserWithContext is the same as DeleteUser with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteUser for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *WorkDocs) DeleteUserWithContext(ctx aws.Context, input *DeleteUserInput, opts ...request.Option) (*DeleteUserOutput, error) {
req, out := c.DeleteUserRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDescribeActivities = "DescribeActivities"
// DescribeActivitiesRequest generates a "aws/request.Request" representing the
// client's request for the DescribeActivities operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeActivities for more information on using the DescribeActivities
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DescribeActivitiesRequest method.
// req, resp := client.DescribeActivitiesRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DescribeActivities
func (c *WorkDocs) DescribeActivitiesRequest(input *DescribeActivitiesInput) (req *request.Request, output *DescribeActivitiesOutput) {
op := &request.Operation{
Name: opDescribeActivities,
HTTPMethod: "GET",
HTTPPath: "/api/v1/activities",
}
if input == nil {
input = &DescribeActivitiesInput{}
}
output = &DescribeActivitiesOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeActivities API operation for Amazon WorkDocs.
//
// Describes the user activities in a specified time period.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon WorkDocs's
// API operation DescribeActivities for usage and error information.
//
// Returned Error Codes:
// * ErrCodeUnauthorizedOperationException "UnauthorizedOperationException"
// The operation is not permitted.
//
// * ErrCodeUnauthorizedResourceAccessException "UnauthorizedResourceAccessException"
// The caller does not have access to perform the action on the resource.
//
// * ErrCodeInvalidArgumentException "InvalidArgumentException"
// The pagination marker or limit fields are not valid.
//
// * ErrCodeFailedDependencyException "FailedDependencyException"
// The AWS Directory Service cannot reach an on-premises instance. Or a dependency
// under the control of the organization is failing, such as a connected Active
// Directory.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// One or more of the dependencies is unavailable.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DescribeActivities
func (c *WorkDocs) DescribeActivities(input *DescribeActivitiesInput) (*DescribeActivitiesOutput, error) {
req, out := c.DescribeActivitiesRequest(input)
return out, req.Send()
}
// DescribeActivitiesWithContext is the same as DescribeActivities with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeActivities for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *WorkDocs) DescribeActivitiesWithContext(ctx aws.Context, input *DescribeActivitiesInput, opts ...request.Option) (*DescribeActivitiesOutput, error) {
req, out := c.DescribeActivitiesRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDescribeComments = "DescribeComments"
// DescribeCommentsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeComments operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeComments for more information on using the DescribeComments
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DescribeCommentsRequest method.
// req, resp := client.DescribeCommentsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DescribeComments
func (c *WorkDocs) DescribeCommentsRequest(input *DescribeCommentsInput) (req *request.Request, output *DescribeCommentsOutput) {
op := &request.Operation{
Name: opDescribeComments,
HTTPMethod: "GET",
HTTPPath: "/api/v1/documents/{DocumentId}/versions/{VersionId}/comments",
}
if input == nil {
input = &DescribeCommentsInput{}
}
output = &DescribeCommentsOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeComments API operation for Amazon WorkDocs.
//
// List all the comments for the specified document version.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon WorkDocs's
// API operation DescribeComments for usage and error information.
//
// Returned Error Codes:
// * ErrCodeEntityNotExistsException "EntityNotExistsException"
// The resource does not exist.
//
// * ErrCodeProhibitedStateException "ProhibitedStateException"
// The specified document version is not in the INITIALIZED state.
//
// * ErrCodeUnauthorizedOperationException "UnauthorizedOperationException"
// The operation is not permitted.
//
// * ErrCodeUnauthorizedResourceAccessException "UnauthorizedResourceAccessException"
// The caller does not have access to perform the action on the resource.
//
// * ErrCodeFailedDependencyException "FailedDependencyException"
// The AWS Directory Service cannot reach an on-premises instance. Or a dependency
// under the control of the organization is failing, such as a connected Active
// Directory.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// One or more of the dependencies is unavailable.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DescribeComments
func (c *WorkDocs) DescribeComments(input *DescribeCommentsInput) (*DescribeCommentsOutput, error) {
req, out := c.DescribeCommentsRequest(input)
return out, req.Send()
}
// DescribeCommentsWithContext is the same as DescribeComments with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeComments for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *WorkDocs) DescribeCommentsWithContext(ctx aws.Context, input *DescribeCommentsInput, opts ...request.Option) (*DescribeCommentsOutput, error) {
req, out := c.DescribeCommentsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDescribeDocumentVersions = "DescribeDocumentVersions"
// DescribeDocumentVersionsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeDocumentVersions operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeDocumentVersions for more information on using the DescribeDocumentVersions
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DescribeDocumentVersionsRequest method.
// req, resp := client.DescribeDocumentVersionsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DescribeDocumentVersions
func (c *WorkDocs) DescribeDocumentVersionsRequest(input *DescribeDocumentVersionsInput) (req *request.Request, output *DescribeDocumentVersionsOutput) {
op := &request.Operation{
Name: opDescribeDocumentVersions,
HTTPMethod: "GET",
HTTPPath: "/api/v1/documents/{DocumentId}/versions",
Paginator: &request.Paginator{
InputTokens: []string{"Marker"},
OutputTokens: []string{"Marker"},
LimitToken: "Limit",
TruncationToken: "",
},
}
if input == nil {
input = &DescribeDocumentVersionsInput{}
}
output = &DescribeDocumentVersionsOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeDocumentVersions API operation for Amazon WorkDocs.
//
// Retrieves the document versions for the specified document.
//
// By default, only active versions are returned.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon WorkDocs's
// API operation DescribeDocumentVersions for usage and error information.
//
// Returned Error Codes:
// * ErrCodeEntityNotExistsException "EntityNotExistsException"
// The resource does not exist.
//
// * ErrCodeUnauthorizedOperationException "UnauthorizedOperationException"
// The operation is not permitted.
//
// * ErrCodeUnauthorizedResourceAccessException "UnauthorizedResourceAccessException"
// The caller does not have access to perform the action on the resource.
//
// * ErrCodeInvalidArgumentException "InvalidArgumentException"
// The pagination marker or limit fields are not valid.
//
// * ErrCodeFailedDependencyException "FailedDependencyException"
// The AWS Directory Service cannot reach an on-premises instance. Or a dependency
// under the control of the organization is failing, such as a connected Active
// Directory.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// One or more of the dependencies is unavailable.
//
// * ErrCodeProhibitedStateException "ProhibitedStateException"
// The specified document version is not in the INITIALIZED state.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DescribeDocumentVersions
func (c *WorkDocs) DescribeDocumentVersions(input *DescribeDocumentVersionsInput) (*DescribeDocumentVersionsOutput, error) {
req, out := c.DescribeDocumentVersionsRequest(input)
return out, req.Send()
}
// DescribeDocumentVersionsWithContext is the same as DescribeDocumentVersions with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeDocumentVersions for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *WorkDocs) DescribeDocumentVersionsWithContext(ctx aws.Context, input *DescribeDocumentVersionsInput, opts ...request.Option) (*DescribeDocumentVersionsOutput, error) {
req, out := c.DescribeDocumentVersionsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// DescribeDocumentVersionsPages iterates over the pages of a DescribeDocumentVersions operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See DescribeDocumentVersions method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a DescribeDocumentVersions operation.
// pageNum := 0
// err := client.DescribeDocumentVersionsPages(params,
// func(page *DescribeDocumentVersionsOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *WorkDocs) DescribeDocumentVersionsPages(input *DescribeDocumentVersionsInput, fn func(*DescribeDocumentVersionsOutput, bool) bool) error {
return c.DescribeDocumentVersionsPagesWithContext(aws.BackgroundContext(), input, fn)
}
// DescribeDocumentVersionsPagesWithContext same as DescribeDocumentVersionsPages except
// it takes a Context and allows setting request options on the pages.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *WorkDocs) DescribeDocumentVersionsPagesWithContext(ctx aws.Context, input *DescribeDocumentVersionsInput, fn func(*DescribeDocumentVersionsOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *DescribeDocumentVersionsInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.DescribeDocumentVersionsRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
cont := true
for p.Next() && cont {
cont = fn(p.Page().(*DescribeDocumentVersionsOutput), !p.HasNextPage())
}
return p.Err()
}
const opDescribeFolderContents = "DescribeFolderContents"
// DescribeFolderContentsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeFolderContents operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeFolderContents for more information on using the DescribeFolderContents
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DescribeFolderContentsRequest method.
// req, resp := client.DescribeFolderContentsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DescribeFolderContents
func (c *WorkDocs) DescribeFolderContentsRequest(input *DescribeFolderContentsInput) (req *request.Request, output *DescribeFolderContentsOutput) {
op := &request.Operation{
Name: opDescribeFolderContents,
HTTPMethod: "GET",
HTTPPath: "/api/v1/folders/{FolderId}/contents",
Paginator: &request.Paginator{
InputTokens: []string{"Marker"},
OutputTokens: []string{"Marker"},
LimitToken: "Limit",
TruncationToken: "",
},
}
if input == nil {
input = &DescribeFolderContentsInput{}
}
output = &DescribeFolderContentsOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeFolderContents API operation for Amazon WorkDocs.
//
// Describes the contents of the specified folder, including its documents and
// subfolders.
//
// By default, Amazon WorkDocs returns the first 100 active document and folder
// metadata items. If there are more results, the response includes a marker
// that you can use to request the next set of results. You can also request
// initialized documents.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon WorkDocs's
// API operation DescribeFolderContents for usage and error information.
//
// Returned Error Codes:
// * ErrCodeEntityNotExistsException "EntityNotExistsException"
// The resource does not exist.
//
// * ErrCodeUnauthorizedResourceAccessException "UnauthorizedResourceAccessException"
// The caller does not have access to perform the action on the resource.
//
// * ErrCodeInvalidArgumentException "InvalidArgumentException"
// The pagination marker or limit fields are not valid.
//
// * ErrCodeFailedDependencyException "FailedDependencyException"
// The AWS Directory Service cannot reach an on-premises instance. Or a dependency
// under the control of the organization is failing, such as a connected Active
// Directory.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// One or more of the dependencies is unavailable.
//
// * ErrCodeProhibitedStateException "ProhibitedStateException"
// The specified document version is not in the INITIALIZED state.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DescribeFolderContents
func (c *WorkDocs) DescribeFolderContents(input *DescribeFolderContentsInput) (*DescribeFolderContentsOutput, error) {
req, out := c.DescribeFolderContentsRequest(input)
return out, req.Send()
}
// DescribeFolderContentsWithContext is the same as DescribeFolderContents with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeFolderContents for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *WorkDocs) DescribeFolderContentsWithContext(ctx aws.Context, input *DescribeFolderContentsInput, opts ...request.Option) (*DescribeFolderContentsOutput, error) {
req, out := c.DescribeFolderContentsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// DescribeFolderContentsPages iterates over the pages of a DescribeFolderContents operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See DescribeFolderContents method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a DescribeFolderContents operation.
// pageNum := 0
// err := client.DescribeFolderContentsPages(params,
// func(page *DescribeFolderContentsOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *WorkDocs) DescribeFolderContentsPages(input *DescribeFolderContentsInput, fn func(*DescribeFolderContentsOutput, bool) bool) error {
return c.DescribeFolderContentsPagesWithContext(aws.BackgroundContext(), input, fn)
}
// DescribeFolderContentsPagesWithContext same as DescribeFolderContentsPages except
// it takes a Context and allows setting request options on the pages.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *WorkDocs) DescribeFolderContentsPagesWithContext(ctx aws.Context, input *DescribeFolderContentsInput, fn func(*DescribeFolderContentsOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *DescribeFolderContentsInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.DescribeFolderContentsRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
cont := true
for p.Next() && cont {
cont = fn(p.Page().(*DescribeFolderContentsOutput), !p.HasNextPage())
}
return p.Err()
}
const opDescribeGroups = "DescribeGroups"
// DescribeGroupsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeGroups operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeGroups for more information on using the DescribeGroups
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DescribeGroupsRequest method.
// req, resp := client.DescribeGroupsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DescribeGroups
func (c *WorkDocs) DescribeGroupsRequest(input *DescribeGroupsInput) (req *request.Request, output *DescribeGroupsOutput) {
op := &request.Operation{
Name: opDescribeGroups,
HTTPMethod: "GET",
HTTPPath: "/api/v1/groups",
}
if input == nil {
input = &DescribeGroupsInput{}
}
output = &DescribeGroupsOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeGroups API operation for Amazon WorkDocs.
//
// Describes the groups specified by the query. Groups are defined by the underlying
// Active Directory.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon WorkDocs's
// API operation DescribeGroups for usage and error information.
//
// Returned Error Codes:
// * ErrCodeUnauthorizedOperationException "UnauthorizedOperationException"
// The operation is not permitted.
//
// * ErrCodeUnauthorizedResourceAccessException "UnauthorizedResourceAccessException"
// The caller does not have access to perform the action on the resource.
//
// * ErrCodeFailedDependencyException "FailedDependencyException"
// The AWS Directory Service cannot reach an on-premises instance. Or a dependency
// under the control of the organization is failing, such as a connected Active
// Directory.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// One or more of the dependencies is unavailable.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DescribeGroups
func (c *WorkDocs) DescribeGroups(input *DescribeGroupsInput) (*DescribeGroupsOutput, error) {
req, out := c.DescribeGroupsRequest(input)
return out, req.Send()
}
// DescribeGroupsWithContext is the same as DescribeGroups with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeGroups for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *WorkDocs) DescribeGroupsWithContext(ctx aws.Context, input *DescribeGroupsInput, opts ...request.Option) (*DescribeGroupsOutput, error) {
req, out := c.DescribeGroupsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDescribeNotificationSubscriptions = "DescribeNotificationSubscriptions"
// DescribeNotificationSubscriptionsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeNotificationSubscriptions operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeNotificationSubscriptions for more information on using the DescribeNotificationSubscriptions
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DescribeNotificationSubscriptionsRequest method.
// req, resp := client.DescribeNotificationSubscriptionsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DescribeNotificationSubscriptions
func (c *WorkDocs) DescribeNotificationSubscriptionsRequest(input *DescribeNotificationSubscriptionsInput) (req *request.Request, output *DescribeNotificationSubscriptionsOutput) {
op := &request.Operation{
Name: opDescribeNotificationSubscriptions,
HTTPMethod: "GET",
HTTPPath: "/api/v1/organizations/{OrganizationId}/subscriptions",
}
if input == nil {
input = &DescribeNotificationSubscriptionsInput{}
}
output = &DescribeNotificationSubscriptionsOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeNotificationSubscriptions API operation for Amazon WorkDocs.
//
// Lists the specified notification subscriptions.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon WorkDocs's
// API operation DescribeNotificationSubscriptions for usage and error information.
//
// Returned Error Codes:
// * ErrCodeUnauthorizedResourceAccessException "UnauthorizedResourceAccessException"
// The caller does not have access to perform the action on the resource.
//
// * ErrCodeEntityNotExistsException "EntityNotExistsException"
// The resource does not exist.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// One or more of the dependencies is unavailable.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DescribeNotificationSubscriptions
func (c *WorkDocs) DescribeNotificationSubscriptions(input *DescribeNotificationSubscriptionsInput) (*DescribeNotificationSubscriptionsOutput, error) {
req, out := c.DescribeNotificationSubscriptionsRequest(input)
return out, req.Send()
}
// DescribeNotificationSubscriptionsWithContext is the same as DescribeNotificationSubscriptions with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeNotificationSubscriptions for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *WorkDocs) DescribeNotificationSubscriptionsWithContext(ctx aws.Context, input *DescribeNotificationSubscriptionsInput, opts ...request.Option) (*DescribeNotificationSubscriptionsOutput, error) {
req, out := c.DescribeNotificationSubscriptionsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDescribeResourcePermissions = "DescribeResourcePermissions"
// DescribeResourcePermissionsRequest generates a "aws/request.Request" representing the
// client's request for the DescribeResourcePermissions operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeResourcePermissions for more information on using the DescribeResourcePermissions
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DescribeResourcePermissionsRequest method.
// req, resp := client.DescribeResourcePermissionsRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DescribeResourcePermissions
func (c *WorkDocs) DescribeResourcePermissionsRequest(input *DescribeResourcePermissionsInput) (req *request.Request, output *DescribeResourcePermissionsOutput) {
op := &request.Operation{
Name: opDescribeResourcePermissions,
HTTPMethod: "GET",
HTTPPath: "/api/v1/resources/{ResourceId}/permissions",
}
if input == nil {
input = &DescribeResourcePermissionsInput{}
}
output = &DescribeResourcePermissionsOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeResourcePermissions API operation for Amazon WorkDocs.
//
// Describes the permissions of a specified resource.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon WorkDocs's
// API operation DescribeResourcePermissions for usage and error information.
//
// Returned Error Codes:
// * ErrCodeUnauthorizedOperationException "UnauthorizedOperationException"
// The operation is not permitted.
//
// * ErrCodeUnauthorizedResourceAccessException "UnauthorizedResourceAccessException"
// The caller does not have access to perform the action on the resource.
//
// * ErrCodeFailedDependencyException "FailedDependencyException"
// The AWS Directory Service cannot reach an on-premises instance. Or a dependency
// under the control of the organization is failing, such as a connected Active
// Directory.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// One or more of the dependencies is unavailable.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DescribeResourcePermissions
func (c *WorkDocs) DescribeResourcePermissions(input *DescribeResourcePermissionsInput) (*DescribeResourcePermissionsOutput, error) {
req, out := c.DescribeResourcePermissionsRequest(input)
return out, req.Send()
}
// DescribeResourcePermissionsWithContext is the same as DescribeResourcePermissions with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeResourcePermissions for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *WorkDocs) DescribeResourcePermissionsWithContext(ctx aws.Context, input *DescribeResourcePermissionsInput, opts ...request.Option) (*DescribeResourcePermissionsOutput, error) {
req, out := c.DescribeResourcePermissionsRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDescribeRootFolders = "DescribeRootFolders"
// DescribeRootFoldersRequest generates a "aws/request.Request" representing the
// client's request for the DescribeRootFolders operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeRootFolders for more information on using the DescribeRootFolders
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DescribeRootFoldersRequest method.
// req, resp := client.DescribeRootFoldersRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DescribeRootFolders
func (c *WorkDocs) DescribeRootFoldersRequest(input *DescribeRootFoldersInput) (req *request.Request, output *DescribeRootFoldersOutput) {
op := &request.Operation{
Name: opDescribeRootFolders,
HTTPMethod: "GET",
HTTPPath: "/api/v1/me/root",
}
if input == nil {
input = &DescribeRootFoldersInput{}
}
output = &DescribeRootFoldersOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeRootFolders API operation for Amazon WorkDocs.
//
// Describes the current user's special folders; the RootFolder and the RecycleBin.
// RootFolder is the root of user's files and folders and RecycleBin is the
// root of recycled items. This is not a valid action for SigV4 (administrative
// API) clients.
//
// This action requires an authentication token. To get an authentication token,
// register an application with Amazon WorkDocs. For more information, see Authentication
// and Access Control for User Applications (https://docs.aws.amazon.com/workdocs/latest/developerguide/wd-auth-user.html)
// in the Amazon WorkDocs Developer Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon WorkDocs's
// API operation DescribeRootFolders for usage and error information.
//
// Returned Error Codes:
// * ErrCodeUnauthorizedOperationException "UnauthorizedOperationException"
// The operation is not permitted.
//
// * ErrCodeUnauthorizedResourceAccessException "UnauthorizedResourceAccessException"
// The caller does not have access to perform the action on the resource.
//
// * ErrCodeInvalidArgumentException "InvalidArgumentException"
// The pagination marker or limit fields are not valid.
//
// * ErrCodeFailedDependencyException "FailedDependencyException"
// The AWS Directory Service cannot reach an on-premises instance. Or a dependency
// under the control of the organization is failing, such as a connected Active
// Directory.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// One or more of the dependencies is unavailable.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DescribeRootFolders
func (c *WorkDocs) DescribeRootFolders(input *DescribeRootFoldersInput) (*DescribeRootFoldersOutput, error) {
req, out := c.DescribeRootFoldersRequest(input)
return out, req.Send()
}
// DescribeRootFoldersWithContext is the same as DescribeRootFolders with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeRootFolders for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *WorkDocs) DescribeRootFoldersWithContext(ctx aws.Context, input *DescribeRootFoldersInput, opts ...request.Option) (*DescribeRootFoldersOutput, error) {
req, out := c.DescribeRootFoldersRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDescribeUsers = "DescribeUsers"
// DescribeUsersRequest generates a "aws/request.Request" representing the
// client's request for the DescribeUsers operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeUsers for more information on using the DescribeUsers
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DescribeUsersRequest method.
// req, resp := client.DescribeUsersRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DescribeUsers
func (c *WorkDocs) DescribeUsersRequest(input *DescribeUsersInput) (req *request.Request, output *DescribeUsersOutput) {
op := &request.Operation{
Name: opDescribeUsers,
HTTPMethod: "GET",
HTTPPath: "/api/v1/users",
Paginator: &request.Paginator{
InputTokens: []string{"Marker"},
OutputTokens: []string{"Marker"},
LimitToken: "Limit",
TruncationToken: "",
},
}
if input == nil {
input = &DescribeUsersInput{}
}
output = &DescribeUsersOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeUsers API operation for Amazon WorkDocs.
//
// Describes the specified users. You can describe all users or filter the results
// (for example, by status or organization).
//
// By default, Amazon WorkDocs returns the first 24 active or pending users.
// If there are more results, the response includes a marker that you can use
// to request the next set of results.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon WorkDocs's
// API operation DescribeUsers for usage and error information.
//
// Returned Error Codes:
// * ErrCodeEntityNotExistsException "EntityNotExistsException"
// The resource does not exist.
//
// * ErrCodeUnauthorizedOperationException "UnauthorizedOperationException"
// The operation is not permitted.
//
// * ErrCodeUnauthorizedResourceAccessException "UnauthorizedResourceAccessException"
// The caller does not have access to perform the action on the resource.
//
// * ErrCodeFailedDependencyException "FailedDependencyException"
// The AWS Directory Service cannot reach an on-premises instance. Or a dependency
// under the control of the organization is failing, such as a connected Active
// Directory.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// One or more of the dependencies is unavailable.
//
// * ErrCodeInvalidArgumentException "InvalidArgumentException"
// The pagination marker or limit fields are not valid.
//
// * ErrCodeRequestedEntityTooLargeException "RequestedEntityTooLargeException"
// The response is too large to return. The request must include a filter to
// reduce the size of the response.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DescribeUsers
func (c *WorkDocs) DescribeUsers(input *DescribeUsersInput) (*DescribeUsersOutput, error) {
req, out := c.DescribeUsersRequest(input)
return out, req.Send()
}
// DescribeUsersWithContext is the same as DescribeUsers with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeUsers for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *WorkDocs) DescribeUsersWithContext(ctx aws.Context, input *DescribeUsersInput, opts ...request.Option) (*DescribeUsersOutput, error) {
req, out := c.DescribeUsersRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// DescribeUsersPages iterates over the pages of a DescribeUsers operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See DescribeUsers method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a DescribeUsers operation.
// pageNum := 0
// err := client.DescribeUsersPages(params,
// func(page *DescribeUsersOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *WorkDocs) DescribeUsersPages(input *DescribeUsersInput, fn func(*DescribeUsersOutput, bool) bool) error {
return c.DescribeUsersPagesWithContext(aws.BackgroundContext(), input, fn)
}
// DescribeUsersPagesWithContext same as DescribeUsersPages except
// it takes a Context and allows setting request options on the pages.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *WorkDocs) DescribeUsersPagesWithContext(ctx aws.Context, input *DescribeUsersInput, fn func(*DescribeUsersOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *DescribeUsersInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.DescribeUsersRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
cont := true
for p.Next() && cont {
cont = fn(p.Page().(*DescribeUsersOutput), !p.HasNextPage())
}
return p.Err()
}
const opGetCurrentUser = "GetCurrentUser"
// GetCurrentUserRequest generates a "aws/request.Request" representing the
// client's request for the GetCurrentUser operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See GetCurrentUser for more information on using the GetCurrentUser
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the GetCurrentUserRequest method.
// req, resp := client.GetCurrentUserRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/GetCurrentUser
func (c *WorkDocs) GetCurrentUserRequest(input *GetCurrentUserInput) (req *request.Request, output *GetCurrentUserOutput) {
op := &request.Operation{
Name: opGetCurrentUser,
HTTPMethod: "GET",
HTTPPath: "/api/v1/me",
}
if input == nil {
input = &GetCurrentUserInput{}
}
output = &GetCurrentUserOutput{}
req = c.newRequest(op, input, output)
return
}
// GetCurrentUser API operation for Amazon WorkDocs.
//
// Retrieves details of the current user for whom the authentication token was
// generated. This is not a valid action for SigV4 (administrative API) clients.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon WorkDocs's
// API operation GetCurrentUser for usage and error information.
//
// Returned Error Codes:
// * ErrCodeEntityNotExistsException "EntityNotExistsException"
// The resource does not exist.
//
// * ErrCodeUnauthorizedOperationException "UnauthorizedOperationException"
// The operation is not permitted.
//
// * ErrCodeUnauthorizedResourceAccessException "UnauthorizedResourceAccessException"
// The caller does not have access to perform the action on the resource.
//
// * ErrCodeFailedDependencyException "FailedDependencyException"
// The AWS Directory Service cannot reach an on-premises instance. Or a dependency
// under the control of the organization is failing, such as a connected Active
// Directory.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// One or more of the dependencies is unavailable.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/GetCurrentUser
func (c *WorkDocs) GetCurrentUser(input *GetCurrentUserInput) (*GetCurrentUserOutput, error) {
req, out := c.GetCurrentUserRequest(input)
return out, req.Send()
}
// GetCurrentUserWithContext is the same as GetCurrentUser with the addition of
// the ability to pass a context and additional request options.
//
// See GetCurrentUser for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *WorkDocs) GetCurrentUserWithContext(ctx aws.Context, input *GetCurrentUserInput, opts ...request.Option) (*GetCurrentUserOutput, error) {
req, out := c.GetCurrentUserRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opGetDocument = "GetDocument"
// GetDocumentRequest generates a "aws/request.Request" representing the
// client's request for the GetDocument operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See GetDocument for more information on using the GetDocument
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the GetDocumentRequest method.
// req, resp := client.GetDocumentRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/GetDocument
func (c *WorkDocs) GetDocumentRequest(input *GetDocumentInput) (req *request.Request, output *GetDocumentOutput) {
op := &request.Operation{
Name: opGetDocument,
HTTPMethod: "GET",
HTTPPath: "/api/v1/documents/{DocumentId}",
}
if input == nil {
input = &GetDocumentInput{}
}
output = &GetDocumentOutput{}
req = c.newRequest(op, input, output)
return
}
// GetDocument API operation for Amazon WorkDocs.
//
// Retrieves details of a document.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon WorkDocs's
// API operation GetDocument for usage and error information.
//
// Returned Error Codes:
// * ErrCodeEntityNotExistsException "EntityNotExistsException"
// The resource does not exist.
//
// * ErrCodeUnauthorizedOperationException "UnauthorizedOperationException"
// The operation is not permitted.
//
// * ErrCodeUnauthorizedResourceAccessException "UnauthorizedResourceAccessException"
// The caller does not have access to perform the action on the resource.
//
// * ErrCodeInvalidArgumentException "InvalidArgumentException"
// The pagination marker or limit fields are not valid.
//
// * ErrCodeFailedDependencyException "FailedDependencyException"
// The AWS Directory Service cannot reach an on-premises instance. Or a dependency
// under the control of the organization is failing, such as a connected Active
// Directory.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// One or more of the dependencies is unavailable.
//
// * ErrCodeInvalidPasswordException "InvalidPasswordException"
// The password is invalid.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/GetDocument
func (c *WorkDocs) GetDocument(input *GetDocumentInput) (*GetDocumentOutput, error) {
req, out := c.GetDocumentRequest(input)
return out, req.Send()
}
// GetDocumentWithContext is the same as GetDocument with the addition of
// the ability to pass a context and additional request options.
//
// See GetDocument for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *WorkDocs) GetDocumentWithContext(ctx aws.Context, input *GetDocumentInput, opts ...request.Option) (*GetDocumentOutput, error) {
req, out := c.GetDocumentRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opGetDocumentPath = "GetDocumentPath"
// GetDocumentPathRequest generates a "aws/request.Request" representing the
// client's request for the GetDocumentPath operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See GetDocumentPath for more information on using the GetDocumentPath
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the GetDocumentPathRequest method.
// req, resp := client.GetDocumentPathRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/GetDocumentPath
func (c *WorkDocs) GetDocumentPathRequest(input *GetDocumentPathInput) (req *request.Request, output *GetDocumentPathOutput) {
op := &request.Operation{
Name: opGetDocumentPath,
HTTPMethod: "GET",
HTTPPath: "/api/v1/documents/{DocumentId}/path",
}
if input == nil {
input = &GetDocumentPathInput{}
}
output = &GetDocumentPathOutput{}
req = c.newRequest(op, input, output)
return
}
// GetDocumentPath API operation for Amazon WorkDocs.
//
// Retrieves the path information (the hierarchy from the root folder) for the
// requested document.
//
// By default, Amazon WorkDocs returns a maximum of 100 levels upwards from
// the requested document and only includes the IDs of the parent folders in
// the path. You can limit the maximum number of levels. You can also request
// the names of the parent folders.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon WorkDocs's
// API operation GetDocumentPath for usage and error information.
//
// Returned Error Codes:
// * ErrCodeEntityNotExistsException "EntityNotExistsException"
// The resource does not exist.
//
// * ErrCodeUnauthorizedOperationException "UnauthorizedOperationException"
// The operation is not permitted.
//
// * ErrCodeUnauthorizedResourceAccessException "UnauthorizedResourceAccessException"
// The caller does not have access to perform the action on the resource.
//
// * ErrCodeFailedDependencyException "FailedDependencyException"
// The AWS Directory Service cannot reach an on-premises instance. Or a dependency
// under the control of the organization is failing, such as a connected Active
// Directory.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// One or more of the dependencies is unavailable.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/GetDocumentPath
func (c *WorkDocs) GetDocumentPath(input *GetDocumentPathInput) (*GetDocumentPathOutput, error) {
req, out := c.GetDocumentPathRequest(input)
return out, req.Send()
}
// GetDocumentPathWithContext is the same as GetDocumentPath with the addition of
// the ability to pass a context and additional request options.
//
// See GetDocumentPath for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *WorkDocs) GetDocumentPathWithContext(ctx aws.Context, input *GetDocumentPathInput, opts ...request.Option) (*GetDocumentPathOutput, error) {
req, out := c.GetDocumentPathRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opGetDocumentVersion = "GetDocumentVersion"
// GetDocumentVersionRequest generates a "aws/request.Request" representing the
// client's request for the GetDocumentVersion operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See GetDocumentVersion for more information on using the GetDocumentVersion
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the GetDocumentVersionRequest method.
// req, resp := client.GetDocumentVersionRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/GetDocumentVersion
func (c *WorkDocs) GetDocumentVersionRequest(input *GetDocumentVersionInput) (req *request.Request, output *GetDocumentVersionOutput) {
op := &request.Operation{
Name: opGetDocumentVersion,
HTTPMethod: "GET",
HTTPPath: "/api/v1/documents/{DocumentId}/versions/{VersionId}",
}
if input == nil {
input = &GetDocumentVersionInput{}
}
output = &GetDocumentVersionOutput{}
req = c.newRequest(op, input, output)
return
}
// GetDocumentVersion API operation for Amazon WorkDocs.
//
// Retrieves version metadata for the specified document.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon WorkDocs's
// API operation GetDocumentVersion for usage and error information.
//
// Returned Error Codes:
// * ErrCodeEntityNotExistsException "EntityNotExistsException"
// The resource does not exist.
//
// * ErrCodeUnauthorizedOperationException "UnauthorizedOperationException"
// The operation is not permitted.
//
// * ErrCodeUnauthorizedResourceAccessException "UnauthorizedResourceAccessException"
// The caller does not have access to perform the action on the resource.
//
// * ErrCodeFailedDependencyException "FailedDependencyException"
// The AWS Directory Service cannot reach an on-premises instance. Or a dependency
// under the control of the organization is failing, such as a connected Active
// Directory.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// One or more of the dependencies is unavailable.
//
// * ErrCodeProhibitedStateException "ProhibitedStateException"
// The specified document version is not in the INITIALIZED state.
//
// * ErrCodeInvalidPasswordException "InvalidPasswordException"
// The password is invalid.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/GetDocumentVersion
func (c *WorkDocs) GetDocumentVersion(input *GetDocumentVersionInput) (*GetDocumentVersionOutput, error) {
req, out := c.GetDocumentVersionRequest(input)
return out, req.Send()
}
// GetDocumentVersionWithContext is the same as GetDocumentVersion with the addition of
// the ability to pass a context and additional request options.
//
// See GetDocumentVersion for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *WorkDocs) GetDocumentVersionWithContext(ctx aws.Context, input *GetDocumentVersionInput, opts ...request.Option) (*GetDocumentVersionOutput, error) {
req, out := c.GetDocumentVersionRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opGetFolder = "GetFolder"
// GetFolderRequest generates a "aws/request.Request" representing the
// client's request for the GetFolder operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See GetFolder for more information on using the GetFolder
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the GetFolderRequest method.
// req, resp := client.GetFolderRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/GetFolder
func (c *WorkDocs) GetFolderRequest(input *GetFolderInput) (req *request.Request, output *GetFolderOutput) {
op := &request.Operation{
Name: opGetFolder,
HTTPMethod: "GET",
HTTPPath: "/api/v1/folders/{FolderId}",
}
if input == nil {
input = &GetFolderInput{}
}
output = &GetFolderOutput{}
req = c.newRequest(op, input, output)
return
}
// GetFolder API operation for Amazon WorkDocs.
//
// Retrieves the metadata of the specified folder.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon WorkDocs's
// API operation GetFolder for usage and error information.
//
// Returned Error Codes:
// * ErrCodeEntityNotExistsException "EntityNotExistsException"
// The resource does not exist.
//
// * ErrCodeUnauthorizedOperationException "UnauthorizedOperationException"
// The operation is not permitted.
//
// * ErrCodeUnauthorizedResourceAccessException "UnauthorizedResourceAccessException"
// The caller does not have access to perform the action on the resource.
//
// * ErrCodeInvalidArgumentException "InvalidArgumentException"
// The pagination marker or limit fields are not valid.
//
// * ErrCodeFailedDependencyException "FailedDependencyException"
// The AWS Directory Service cannot reach an on-premises instance. Or a dependency
// under the control of the organization is failing, such as a connected Active
// Directory.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// One or more of the dependencies is unavailable.
//
// * ErrCodeProhibitedStateException "ProhibitedStateException"
// The specified document version is not in the INITIALIZED state.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/GetFolder
func (c *WorkDocs) GetFolder(input *GetFolderInput) (*GetFolderOutput, error) {
req, out := c.GetFolderRequest(input)
return out, req.Send()
}
// GetFolderWithContext is the same as GetFolder with the addition of
// the ability to pass a context and additional request options.
//
// See GetFolder for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *WorkDocs) GetFolderWithContext(ctx aws.Context, input *GetFolderInput, opts ...request.Option) (*GetFolderOutput, error) {
req, out := c.GetFolderRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opGetFolderPath = "GetFolderPath"
// GetFolderPathRequest generates a "aws/request.Request" representing the
// client's request for the GetFolderPath operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See GetFolderPath for more information on using the GetFolderPath
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the GetFolderPathRequest method.
// req, resp := client.GetFolderPathRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/GetFolderPath
func (c *WorkDocs) GetFolderPathRequest(input *GetFolderPathInput) (req *request.Request, output *GetFolderPathOutput) {
op := &request.Operation{
Name: opGetFolderPath,
HTTPMethod: "GET",
HTTPPath: "/api/v1/folders/{FolderId}/path",
}
if input == nil {
input = &GetFolderPathInput{}
}
output = &GetFolderPathOutput{}
req = c.newRequest(op, input, output)
return
}
// GetFolderPath API operation for Amazon WorkDocs.
//
// Retrieves the path information (the hierarchy from the root folder) for the
// specified folder.
//
// By default, Amazon WorkDocs returns a maximum of 100 levels upwards from
// the requested folder and only includes the IDs of the parent folders in the
// path. You can limit the maximum number of levels. You can also request the
// parent folder names.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon WorkDocs's
// API operation GetFolderPath for usage and error information.
//
// Returned Error Codes:
// * ErrCodeEntityNotExistsException "EntityNotExistsException"
// The resource does not exist.
//
// * ErrCodeUnauthorizedOperationException "UnauthorizedOperationException"
// The operation is not permitted.
//
// * ErrCodeUnauthorizedResourceAccessException "UnauthorizedResourceAccessException"
// The caller does not have access to perform the action on the resource.
//
// * ErrCodeFailedDependencyException "FailedDependencyException"
// The AWS Directory Service cannot reach an on-premises instance. Or a dependency
// under the control of the organization is failing, such as a connected Active
// Directory.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// One or more of the dependencies is unavailable.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/GetFolderPath
func (c *WorkDocs) GetFolderPath(input *GetFolderPathInput) (*GetFolderPathOutput, error) {
req, out := c.GetFolderPathRequest(input)
return out, req.Send()
}
// GetFolderPathWithContext is the same as GetFolderPath with the addition of
// the ability to pass a context and additional request options.
//
// See GetFolderPath for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *WorkDocs) GetFolderPathWithContext(ctx aws.Context, input *GetFolderPathInput, opts ...request.Option) (*GetFolderPathOutput, error) {
req, out := c.GetFolderPathRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opGetResources = "GetResources"
// GetResourcesRequest generates a "aws/request.Request" representing the
// client's request for the GetResources operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See GetResources for more information on using the GetResources
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the GetResourcesRequest method.
// req, resp := client.GetResourcesRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/GetResources
func (c *WorkDocs) GetResourcesRequest(input *GetResourcesInput) (req *request.Request, output *GetResourcesOutput) {
op := &request.Operation{
Name: opGetResources,
HTTPMethod: "GET",
HTTPPath: "/api/v1/resources",
}
if input == nil {
input = &GetResourcesInput{}
}
output = &GetResourcesOutput{}
req = c.newRequest(op, input, output)
return
}
// GetResources API operation for Amazon WorkDocs.
//
// Retrieves a collection of resources, including folders and documents. The
// only CollectionType supported is SHARED_WITH_ME.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon WorkDocs's
// API operation GetResources for usage and error information.
//
// Returned Error Codes:
// * ErrCodeUnauthorizedResourceAccessException "UnauthorizedResourceAccessException"
// The caller does not have access to perform the action on the resource.
//
// * ErrCodeUnauthorizedOperationException "UnauthorizedOperationException"
// The operation is not permitted.
//
// * ErrCodeInvalidArgumentException "InvalidArgumentException"
// The pagination marker or limit fields are not valid.
//
// * ErrCodeFailedDependencyException "FailedDependencyException"
// The AWS Directory Service cannot reach an on-premises instance. Or a dependency
// under the control of the organization is failing, such as a connected Active
// Directory.
//
// * ErrCodeServiceUnavailableException "ServiceUnavailableException"
// One or more of the dependencies is unavailable.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/GetResources
func (c *WorkDocs) GetResources(input *GetResourcesInput) (*GetResourcesOutput, error) {
req, out := c.GetResourcesRequest(input)
return out, req.Send()
}
// GetResourcesWithContext is the same as GetResources with the addition of
// the ability to pass a context and additional request options.
//
// See GetResources for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *WorkDocs) GetResourcesWithContext(ctx aws.Context, input *GetResourcesInput, opts ...request.Option) (*GetResourcesOutput, error) {
req, out := c.GetResourcesRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opInitiateDocumentVersionUpload = "InitiateDocumentVersionUpload"
// InitiateDocumentVersionUploadRequest generates a "aws/request.Request" representing the
// client's request for the InitiateDocumentVersionUpload operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See InitiateDocumentVersionUpload for more information on using the InitiateDocumentVersionUpload
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the InitiateDocumentVersionUploadRequest method.
// req, resp := client.InitiateDocumentVersionUploadRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/InitiateDocumentVersionUpload
func (c *WorkDocs) InitiateDocumentVersionUploadRequest(input *InitiateDocumentVersionUploadInput) (req *request.Request, output *InitiateDocumentVersionUploadOutput) {
op := &request.Operation{
Name: opInitiateDocumentVersionUpload,
HTTPMethod: "POST",
HTTPPath: "/api/v1/documents",
}
if input == nil {
input = &InitiateDocumentVersionUploadInput{}
}
output = &InitiateDocumentVersionUploadOutput{}
req = c.newRequest(op, input, output)
return
}
// InitiateDocumentVersionUpload API operation for Amazon WorkDocs.
//
// Creates a new document object and version object.
//
// The client specifies the parent folder ID and name of the document to upload.
// The ID is optionally specified when creating a new version of an existing
// document. This is the first step to upload a document. Next, upload the document
// to the URL returned from the call, and then call UpdateDocumentVersion.
//
// To cancel the document upload, call AbortDocumentVersionUpload.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon WorkDocs's
// API operation InitiateDocumentVersionUpload for usage and error information.
//
// Returned Error Codes:
// * ErrCodeEntityNotExistsException "EntityNotExistsException"
// The resource does not exist.
//
// * ErrCodeEntityAlreadyExistsException "EntityAlreadyExistsException"
// The resource already exists.
//
// * ErrCodeStorageLimitExceededException "StorageLimitExceededException"
// The storage limit has been exceeded.
//
// * ErrCodeStorageLimitWillExceedException "StorageLimitWillExceedException"
// The storage limit will be exceeded.
//
// * ErrCodeProhibitedStateException "ProhibitedStateException"
// The specified document version is not in the INITIALIZED state.
//
// * ErrCodeUnauthorizedOperationException "UnauthorizedOperationException"
// The operation is not permitted.
//
// * ErrCodeUnauthorizedResourceAccessException "UnauthorizedResourceAccessException"
// The caller does not have access to perform the action on the resource.
//
// * ErrCodeFailedDependencyException "FailedDependencyException"
// The AWS Directory Service cannot reach an on-premises instance. Or a dependency
<