/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include #include namespace Aws { namespace DirectoryService { namespace Model { /** *

Directory Service for Microsoft Active Directory allows you to configure * trust relationships. For example, you can establish a trust between your Managed * Microsoft AD directory, and your existing self-managed Microsoft Active * Directory. This would allow you to provide users and groups access to resources * in either domain, with a single set of credentials.

This action initiates * the creation of the Amazon Web Services side of a trust relationship between an * Managed Microsoft AD directory and an external domain.

See Also:

* AWS * API Reference

*/ class CreateTrustRequest : public DirectoryServiceRequest { public: AWS_DIRECTORYSERVICE_API CreateTrustRequest(); // 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 "CreateTrust"; } AWS_DIRECTORYSERVICE_API Aws::String SerializePayload() const override; AWS_DIRECTORYSERVICE_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

The Directory ID of the Managed Microsoft AD directory for which to establish * the trust relationship.

*/ inline const Aws::String& GetDirectoryId() const{ return m_directoryId; } /** *

The Directory ID of the Managed Microsoft AD directory for which to establish * the trust relationship.

*/ inline bool DirectoryIdHasBeenSet() const { return m_directoryIdHasBeenSet; } /** *

The Directory ID of the Managed Microsoft AD directory for which to establish * the trust relationship.

*/ inline void SetDirectoryId(const Aws::String& value) { m_directoryIdHasBeenSet = true; m_directoryId = value; } /** *

The Directory ID of the Managed Microsoft AD directory for which to establish * the trust relationship.

*/ inline void SetDirectoryId(Aws::String&& value) { m_directoryIdHasBeenSet = true; m_directoryId = std::move(value); } /** *

The Directory ID of the Managed Microsoft AD directory for which to establish * the trust relationship.

*/ inline void SetDirectoryId(const char* value) { m_directoryIdHasBeenSet = true; m_directoryId.assign(value); } /** *

The Directory ID of the Managed Microsoft AD directory for which to establish * the trust relationship.

*/ inline CreateTrustRequest& WithDirectoryId(const Aws::String& value) { SetDirectoryId(value); return *this;} /** *

The Directory ID of the Managed Microsoft AD directory for which to establish * the trust relationship.

*/ inline CreateTrustRequest& WithDirectoryId(Aws::String&& value) { SetDirectoryId(std::move(value)); return *this;} /** *

The Directory ID of the Managed Microsoft AD directory for which to establish * the trust relationship.

*/ inline CreateTrustRequest& WithDirectoryId(const char* value) { SetDirectoryId(value); return *this;} /** *

The Fully Qualified Domain Name (FQDN) of the external domain for which to * create the trust relationship.

*/ inline const Aws::String& GetRemoteDomainName() const{ return m_remoteDomainName; } /** *

The Fully Qualified Domain Name (FQDN) of the external domain for which to * create the trust relationship.

*/ inline bool RemoteDomainNameHasBeenSet() const { return m_remoteDomainNameHasBeenSet; } /** *

The Fully Qualified Domain Name (FQDN) of the external domain for which to * create the trust relationship.

*/ inline void SetRemoteDomainName(const Aws::String& value) { m_remoteDomainNameHasBeenSet = true; m_remoteDomainName = value; } /** *

The Fully Qualified Domain Name (FQDN) of the external domain for which to * create the trust relationship.

*/ inline void SetRemoteDomainName(Aws::String&& value) { m_remoteDomainNameHasBeenSet = true; m_remoteDomainName = std::move(value); } /** *

The Fully Qualified Domain Name (FQDN) of the external domain for which to * create the trust relationship.

*/ inline void SetRemoteDomainName(const char* value) { m_remoteDomainNameHasBeenSet = true; m_remoteDomainName.assign(value); } /** *

The Fully Qualified Domain Name (FQDN) of the external domain for which to * create the trust relationship.

*/ inline CreateTrustRequest& WithRemoteDomainName(const Aws::String& value) { SetRemoteDomainName(value); return *this;} /** *

The Fully Qualified Domain Name (FQDN) of the external domain for which to * create the trust relationship.

*/ inline CreateTrustRequest& WithRemoteDomainName(Aws::String&& value) { SetRemoteDomainName(std::move(value)); return *this;} /** *

The Fully Qualified Domain Name (FQDN) of the external domain for which to * create the trust relationship.

*/ inline CreateTrustRequest& WithRemoteDomainName(const char* value) { SetRemoteDomainName(value); return *this;} /** *

The trust password. The must be the same password that was used when creating * the trust relationship on the external domain.

*/ inline const Aws::String& GetTrustPassword() const{ return m_trustPassword; } /** *

The trust password. The must be the same password that was used when creating * the trust relationship on the external domain.

*/ inline bool TrustPasswordHasBeenSet() const { return m_trustPasswordHasBeenSet; } /** *

The trust password. The must be the same password that was used when creating * the trust relationship on the external domain.

*/ inline void SetTrustPassword(const Aws::String& value) { m_trustPasswordHasBeenSet = true; m_trustPassword = value; } /** *

The trust password. The must be the same password that was used when creating * the trust relationship on the external domain.

*/ inline void SetTrustPassword(Aws::String&& value) { m_trustPasswordHasBeenSet = true; m_trustPassword = std::move(value); } /** *

The trust password. The must be the same password that was used when creating * the trust relationship on the external domain.

*/ inline void SetTrustPassword(const char* value) { m_trustPasswordHasBeenSet = true; m_trustPassword.assign(value); } /** *

The trust password. The must be the same password that was used when creating * the trust relationship on the external domain.

*/ inline CreateTrustRequest& WithTrustPassword(const Aws::String& value) { SetTrustPassword(value); return *this;} /** *

The trust password. The must be the same password that was used when creating * the trust relationship on the external domain.

*/ inline CreateTrustRequest& WithTrustPassword(Aws::String&& value) { SetTrustPassword(std::move(value)); return *this;} /** *

The trust password. The must be the same password that was used when creating * the trust relationship on the external domain.

*/ inline CreateTrustRequest& WithTrustPassword(const char* value) { SetTrustPassword(value); return *this;} /** *

The direction of the trust relationship.

*/ inline const TrustDirection& GetTrustDirection() const{ return m_trustDirection; } /** *

The direction of the trust relationship.

*/ inline bool TrustDirectionHasBeenSet() const { return m_trustDirectionHasBeenSet; } /** *

The direction of the trust relationship.

*/ inline void SetTrustDirection(const TrustDirection& value) { m_trustDirectionHasBeenSet = true; m_trustDirection = value; } /** *

The direction of the trust relationship.

*/ inline void SetTrustDirection(TrustDirection&& value) { m_trustDirectionHasBeenSet = true; m_trustDirection = std::move(value); } /** *

The direction of the trust relationship.

*/ inline CreateTrustRequest& WithTrustDirection(const TrustDirection& value) { SetTrustDirection(value); return *this;} /** *

The direction of the trust relationship.

*/ inline CreateTrustRequest& WithTrustDirection(TrustDirection&& value) { SetTrustDirection(std::move(value)); return *this;} /** *

The trust relationship type. Forest is the default.

*/ inline const TrustType& GetTrustType() const{ return m_trustType; } /** *

The trust relationship type. Forest is the default.

*/ inline bool TrustTypeHasBeenSet() const { return m_trustTypeHasBeenSet; } /** *

The trust relationship type. Forest is the default.

*/ inline void SetTrustType(const TrustType& value) { m_trustTypeHasBeenSet = true; m_trustType = value; } /** *

The trust relationship type. Forest is the default.

*/ inline void SetTrustType(TrustType&& value) { m_trustTypeHasBeenSet = true; m_trustType = std::move(value); } /** *

The trust relationship type. Forest is the default.

*/ inline CreateTrustRequest& WithTrustType(const TrustType& value) { SetTrustType(value); return *this;} /** *

The trust relationship type. Forest is the default.

*/ inline CreateTrustRequest& WithTrustType(TrustType&& value) { SetTrustType(std::move(value)); return *this;} /** *

The IP addresses of the remote DNS server associated with * RemoteDomainName.

*/ inline const Aws::Vector& GetConditionalForwarderIpAddrs() const{ return m_conditionalForwarderIpAddrs; } /** *

The IP addresses of the remote DNS server associated with * RemoteDomainName.

*/ inline bool ConditionalForwarderIpAddrsHasBeenSet() const { return m_conditionalForwarderIpAddrsHasBeenSet; } /** *

The IP addresses of the remote DNS server associated with * RemoteDomainName.

*/ inline void SetConditionalForwarderIpAddrs(const Aws::Vector& value) { m_conditionalForwarderIpAddrsHasBeenSet = true; m_conditionalForwarderIpAddrs = value; } /** *

The IP addresses of the remote DNS server associated with * RemoteDomainName.

*/ inline void SetConditionalForwarderIpAddrs(Aws::Vector&& value) { m_conditionalForwarderIpAddrsHasBeenSet = true; m_conditionalForwarderIpAddrs = std::move(value); } /** *

The IP addresses of the remote DNS server associated with * RemoteDomainName.

*/ inline CreateTrustRequest& WithConditionalForwarderIpAddrs(const Aws::Vector& value) { SetConditionalForwarderIpAddrs(value); return *this;} /** *

The IP addresses of the remote DNS server associated with * RemoteDomainName.

*/ inline CreateTrustRequest& WithConditionalForwarderIpAddrs(Aws::Vector&& value) { SetConditionalForwarderIpAddrs(std::move(value)); return *this;} /** *

The IP addresses of the remote DNS server associated with * RemoteDomainName.

*/ inline CreateTrustRequest& AddConditionalForwarderIpAddrs(const Aws::String& value) { m_conditionalForwarderIpAddrsHasBeenSet = true; m_conditionalForwarderIpAddrs.push_back(value); return *this; } /** *

The IP addresses of the remote DNS server associated with * RemoteDomainName.

*/ inline CreateTrustRequest& AddConditionalForwarderIpAddrs(Aws::String&& value) { m_conditionalForwarderIpAddrsHasBeenSet = true; m_conditionalForwarderIpAddrs.push_back(std::move(value)); return *this; } /** *

The IP addresses of the remote DNS server associated with * RemoteDomainName.

*/ inline CreateTrustRequest& AddConditionalForwarderIpAddrs(const char* value) { m_conditionalForwarderIpAddrsHasBeenSet = true; m_conditionalForwarderIpAddrs.push_back(value); return *this; } /** *

Optional parameter to enable selective authentication for the trust.

*/ inline const SelectiveAuth& GetSelectiveAuth() const{ return m_selectiveAuth; } /** *

Optional parameter to enable selective authentication for the trust.

*/ inline bool SelectiveAuthHasBeenSet() const { return m_selectiveAuthHasBeenSet; } /** *

Optional parameter to enable selective authentication for the trust.

*/ inline void SetSelectiveAuth(const SelectiveAuth& value) { m_selectiveAuthHasBeenSet = true; m_selectiveAuth = value; } /** *

Optional parameter to enable selective authentication for the trust.

*/ inline void SetSelectiveAuth(SelectiveAuth&& value) { m_selectiveAuthHasBeenSet = true; m_selectiveAuth = std::move(value); } /** *

Optional parameter to enable selective authentication for the trust.

*/ inline CreateTrustRequest& WithSelectiveAuth(const SelectiveAuth& value) { SetSelectiveAuth(value); return *this;} /** *

Optional parameter to enable selective authentication for the trust.

*/ inline CreateTrustRequest& WithSelectiveAuth(SelectiveAuth&& value) { SetSelectiveAuth(std::move(value)); return *this;} private: Aws::String m_directoryId; bool m_directoryIdHasBeenSet = false; Aws::String m_remoteDomainName; bool m_remoteDomainNameHasBeenSet = false; Aws::String m_trustPassword; bool m_trustPasswordHasBeenSet = false; TrustDirection m_trustDirection; bool m_trustDirectionHasBeenSet = false; TrustType m_trustType; bool m_trustTypeHasBeenSet = false; Aws::Vector m_conditionalForwarderIpAddrs; bool m_conditionalForwarderIpAddrsHasBeenSet = false; SelectiveAuth m_selectiveAuth; bool m_selectiveAuthHasBeenSet = false; }; } // namespace Model } // namespace DirectoryService } // namespace Aws