/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include namespace Aws { namespace SSM { namespace Model { /** */ class AWS_SSM_API ModifyDocumentPermissionRequest : public SSMRequest { public: ModifyDocumentPermissionRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "ModifyDocumentPermission"; } Aws::String SerializePayload() const override; Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

The name of the document that you want to share.

*/ inline const Aws::String& GetName() const{ return m_name; } /** *

The name of the document that you want to share.

*/ inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } /** *

The name of the document that you want to share.

*/ inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } /** *

The name of the document that you want to share.

*/ inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } /** *

The name of the document that you want to share.

*/ inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } /** *

The name of the document that you want to share.

*/ inline ModifyDocumentPermissionRequest& WithName(const Aws::String& value) { SetName(value); return *this;} /** *

The name of the document that you want to share.

*/ inline ModifyDocumentPermissionRequest& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} /** *

The name of the document that you want to share.

*/ inline ModifyDocumentPermissionRequest& WithName(const char* value) { SetName(value); return *this;} /** *

The permission type for the document. The permission type can be * Share.

*/ inline const DocumentPermissionType& GetPermissionType() const{ return m_permissionType; } /** *

The permission type for the document. The permission type can be * Share.

*/ inline bool PermissionTypeHasBeenSet() const { return m_permissionTypeHasBeenSet; } /** *

The permission type for the document. The permission type can be * Share.

*/ inline void SetPermissionType(const DocumentPermissionType& value) { m_permissionTypeHasBeenSet = true; m_permissionType = value; } /** *

The permission type for the document. The permission type can be * Share.

*/ inline void SetPermissionType(DocumentPermissionType&& value) { m_permissionTypeHasBeenSet = true; m_permissionType = std::move(value); } /** *

The permission type for the document. The permission type can be * Share.

*/ inline ModifyDocumentPermissionRequest& WithPermissionType(const DocumentPermissionType& value) { SetPermissionType(value); return *this;} /** *

The permission type for the document. The permission type can be * Share.

*/ inline ModifyDocumentPermissionRequest& WithPermissionType(DocumentPermissionType&& value) { SetPermissionType(std::move(value)); return *this;} /** *

The AWS user accounts that should have access to the document. The account * IDs can either be a group of account IDs or All.

*/ inline const Aws::Vector& GetAccountIdsToAdd() const{ return m_accountIdsToAdd; } /** *

The AWS user accounts that should have access to the document. The account * IDs can either be a group of account IDs or All.

*/ inline bool AccountIdsToAddHasBeenSet() const { return m_accountIdsToAddHasBeenSet; } /** *

The AWS user accounts that should have access to the document. The account * IDs can either be a group of account IDs or All.

*/ inline void SetAccountIdsToAdd(const Aws::Vector& value) { m_accountIdsToAddHasBeenSet = true; m_accountIdsToAdd = value; } /** *

The AWS user accounts that should have access to the document. The account * IDs can either be a group of account IDs or All.

*/ inline void SetAccountIdsToAdd(Aws::Vector&& value) { m_accountIdsToAddHasBeenSet = true; m_accountIdsToAdd = std::move(value); } /** *

The AWS user accounts that should have access to the document. The account * IDs can either be a group of account IDs or All.

*/ inline ModifyDocumentPermissionRequest& WithAccountIdsToAdd(const Aws::Vector& value) { SetAccountIdsToAdd(value); return *this;} /** *

The AWS user accounts that should have access to the document. The account * IDs can either be a group of account IDs or All.

*/ inline ModifyDocumentPermissionRequest& WithAccountIdsToAdd(Aws::Vector&& value) { SetAccountIdsToAdd(std::move(value)); return *this;} /** *

The AWS user accounts that should have access to the document. The account * IDs can either be a group of account IDs or All.

*/ inline ModifyDocumentPermissionRequest& AddAccountIdsToAdd(const Aws::String& value) { m_accountIdsToAddHasBeenSet = true; m_accountIdsToAdd.push_back(value); return *this; } /** *

The AWS user accounts that should have access to the document. The account * IDs can either be a group of account IDs or All.

*/ inline ModifyDocumentPermissionRequest& AddAccountIdsToAdd(Aws::String&& value) { m_accountIdsToAddHasBeenSet = true; m_accountIdsToAdd.push_back(std::move(value)); return *this; } /** *

The AWS user accounts that should have access to the document. The account * IDs can either be a group of account IDs or All.

*/ inline ModifyDocumentPermissionRequest& AddAccountIdsToAdd(const char* value) { m_accountIdsToAddHasBeenSet = true; m_accountIdsToAdd.push_back(value); return *this; } /** *

The AWS user accounts that should no longer have access to the document. The * AWS user account can either be a group of account IDs or All. This action * has a higher priority than AccountIdsToAdd. If you specify an account ID * to add and the same ID to remove, the system removes access to the document.

*/ inline const Aws::Vector& GetAccountIdsToRemove() const{ return m_accountIdsToRemove; } /** *

The AWS user accounts that should no longer have access to the document. The * AWS user account can either be a group of account IDs or All. This action * has a higher priority than AccountIdsToAdd. If you specify an account ID * to add and the same ID to remove, the system removes access to the document.

*/ inline bool AccountIdsToRemoveHasBeenSet() const { return m_accountIdsToRemoveHasBeenSet; } /** *

The AWS user accounts that should no longer have access to the document. The * AWS user account can either be a group of account IDs or All. This action * has a higher priority than AccountIdsToAdd. If you specify an account ID * to add and the same ID to remove, the system removes access to the document.

*/ inline void SetAccountIdsToRemove(const Aws::Vector& value) { m_accountIdsToRemoveHasBeenSet = true; m_accountIdsToRemove = value; } /** *

The AWS user accounts that should no longer have access to the document. The * AWS user account can either be a group of account IDs or All. This action * has a higher priority than AccountIdsToAdd. If you specify an account ID * to add and the same ID to remove, the system removes access to the document.

*/ inline void SetAccountIdsToRemove(Aws::Vector&& value) { m_accountIdsToRemoveHasBeenSet = true; m_accountIdsToRemove = std::move(value); } /** *

The AWS user accounts that should no longer have access to the document. The * AWS user account can either be a group of account IDs or All. This action * has a higher priority than AccountIdsToAdd. If you specify an account ID * to add and the same ID to remove, the system removes access to the document.

*/ inline ModifyDocumentPermissionRequest& WithAccountIdsToRemove(const Aws::Vector& value) { SetAccountIdsToRemove(value); return *this;} /** *

The AWS user accounts that should no longer have access to the document. The * AWS user account can either be a group of account IDs or All. This action * has a higher priority than AccountIdsToAdd. If you specify an account ID * to add and the same ID to remove, the system removes access to the document.

*/ inline ModifyDocumentPermissionRequest& WithAccountIdsToRemove(Aws::Vector&& value) { SetAccountIdsToRemove(std::move(value)); return *this;} /** *

The AWS user accounts that should no longer have access to the document. The * AWS user account can either be a group of account IDs or All. This action * has a higher priority than AccountIdsToAdd. If you specify an account ID * to add and the same ID to remove, the system removes access to the document.

*/ inline ModifyDocumentPermissionRequest& AddAccountIdsToRemove(const Aws::String& value) { m_accountIdsToRemoveHasBeenSet = true; m_accountIdsToRemove.push_back(value); return *this; } /** *

The AWS user accounts that should no longer have access to the document. The * AWS user account can either be a group of account IDs or All. This action * has a higher priority than AccountIdsToAdd. If you specify an account ID * to add and the same ID to remove, the system removes access to the document.

*/ inline ModifyDocumentPermissionRequest& AddAccountIdsToRemove(Aws::String&& value) { m_accountIdsToRemoveHasBeenSet = true; m_accountIdsToRemove.push_back(std::move(value)); return *this; } /** *

The AWS user accounts that should no longer have access to the document. The * AWS user account can either be a group of account IDs or All. This action * has a higher priority than AccountIdsToAdd. If you specify an account ID * to add and the same ID to remove, the system removes access to the document.

*/ inline ModifyDocumentPermissionRequest& AddAccountIdsToRemove(const char* value) { m_accountIdsToRemoveHasBeenSet = true; m_accountIdsToRemove.push_back(value); return *this; } /** *

(Optional) The version of the document to share. If it's not specified, the * system choose the Default version to share.

*/ inline const Aws::String& GetSharedDocumentVersion() const{ return m_sharedDocumentVersion; } /** *

(Optional) The version of the document to share. If it's not specified, the * system choose the Default version to share.

*/ inline bool SharedDocumentVersionHasBeenSet() const { return m_sharedDocumentVersionHasBeenSet; } /** *

(Optional) The version of the document to share. If it's not specified, the * system choose the Default version to share.

*/ inline void SetSharedDocumentVersion(const Aws::String& value) { m_sharedDocumentVersionHasBeenSet = true; m_sharedDocumentVersion = value; } /** *

(Optional) The version of the document to share. If it's not specified, the * system choose the Default version to share.

*/ inline void SetSharedDocumentVersion(Aws::String&& value) { m_sharedDocumentVersionHasBeenSet = true; m_sharedDocumentVersion = std::move(value); } /** *

(Optional) The version of the document to share. If it's not specified, the * system choose the Default version to share.

*/ inline void SetSharedDocumentVersion(const char* value) { m_sharedDocumentVersionHasBeenSet = true; m_sharedDocumentVersion.assign(value); } /** *

(Optional) The version of the document to share. If it's not specified, the * system choose the Default version to share.

*/ inline ModifyDocumentPermissionRequest& WithSharedDocumentVersion(const Aws::String& value) { SetSharedDocumentVersion(value); return *this;} /** *

(Optional) The version of the document to share. If it's not specified, the * system choose the Default version to share.

*/ inline ModifyDocumentPermissionRequest& WithSharedDocumentVersion(Aws::String&& value) { SetSharedDocumentVersion(std::move(value)); return *this;} /** *

(Optional) The version of the document to share. If it's not specified, the * system choose the Default version to share.

*/ inline ModifyDocumentPermissionRequest& WithSharedDocumentVersion(const char* value) { SetSharedDocumentVersion(value); return *this;} private: Aws::String m_name; bool m_nameHasBeenSet; DocumentPermissionType m_permissionType; bool m_permissionTypeHasBeenSet; Aws::Vector m_accountIdsToAdd; bool m_accountIdsToAddHasBeenSet; Aws::Vector m_accountIdsToRemove; bool m_accountIdsToRemoveHasBeenSet; Aws::String m_sharedDocumentVersion; bool m_sharedDocumentVersionHasBeenSet; }; } // namespace Model } // namespace SSM } // namespace Aws