/** * 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 ACMPCA { namespace Model { /** */ class CreatePermissionRequest : public ACMPCARequest { public: AWS_ACMPCA_API CreatePermissionRequest(); // 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 "CreatePermission"; } AWS_ACMPCA_API Aws::String SerializePayload() const override; AWS_ACMPCA_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

The Amazon Resource Name (ARN) of the CA that grants the permissions. You can * find the ARN by calling the ListCertificateAuthorities * action. This must have the following form:

* arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 * .

*/ inline const Aws::String& GetCertificateAuthorityArn() const{ return m_certificateAuthorityArn; } /** *

The Amazon Resource Name (ARN) of the CA that grants the permissions. You can * find the ARN by calling the ListCertificateAuthorities * action. This must have the following form:

* arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 * .

*/ inline bool CertificateAuthorityArnHasBeenSet() const { return m_certificateAuthorityArnHasBeenSet; } /** *

The Amazon Resource Name (ARN) of the CA that grants the permissions. You can * find the ARN by calling the ListCertificateAuthorities * action. This must have the following form:

* arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 * .

*/ inline void SetCertificateAuthorityArn(const Aws::String& value) { m_certificateAuthorityArnHasBeenSet = true; m_certificateAuthorityArn = value; } /** *

The Amazon Resource Name (ARN) of the CA that grants the permissions. You can * find the ARN by calling the ListCertificateAuthorities * action. This must have the following form:

* arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 * .

*/ inline void SetCertificateAuthorityArn(Aws::String&& value) { m_certificateAuthorityArnHasBeenSet = true; m_certificateAuthorityArn = std::move(value); } /** *

The Amazon Resource Name (ARN) of the CA that grants the permissions. You can * find the ARN by calling the ListCertificateAuthorities * action. This must have the following form:

* arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 * .

*/ inline void SetCertificateAuthorityArn(const char* value) { m_certificateAuthorityArnHasBeenSet = true; m_certificateAuthorityArn.assign(value); } /** *

The Amazon Resource Name (ARN) of the CA that grants the permissions. You can * find the ARN by calling the ListCertificateAuthorities * action. This must have the following form:

* arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 * .

*/ inline CreatePermissionRequest& WithCertificateAuthorityArn(const Aws::String& value) { SetCertificateAuthorityArn(value); return *this;} /** *

The Amazon Resource Name (ARN) of the CA that grants the permissions. You can * find the ARN by calling the ListCertificateAuthorities * action. This must have the following form:

* arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 * .

*/ inline CreatePermissionRequest& WithCertificateAuthorityArn(Aws::String&& value) { SetCertificateAuthorityArn(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of the CA that grants the permissions. You can * find the ARN by calling the ListCertificateAuthorities * action. This must have the following form:

* arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 * .

*/ inline CreatePermissionRequest& WithCertificateAuthorityArn(const char* value) { SetCertificateAuthorityArn(value); return *this;} /** *

The Amazon Web Services service or identity that receives the permission. At * this time, the only valid principal is acm.amazonaws.com.

*/ inline const Aws::String& GetPrincipal() const{ return m_principal; } /** *

The Amazon Web Services service or identity that receives the permission. At * this time, the only valid principal is acm.amazonaws.com.

*/ inline bool PrincipalHasBeenSet() const { return m_principalHasBeenSet; } /** *

The Amazon Web Services service or identity that receives the permission. At * this time, the only valid principal is acm.amazonaws.com.

*/ inline void SetPrincipal(const Aws::String& value) { m_principalHasBeenSet = true; m_principal = value; } /** *

The Amazon Web Services service or identity that receives the permission. At * this time, the only valid principal is acm.amazonaws.com.

*/ inline void SetPrincipal(Aws::String&& value) { m_principalHasBeenSet = true; m_principal = std::move(value); } /** *

The Amazon Web Services service or identity that receives the permission. At * this time, the only valid principal is acm.amazonaws.com.

*/ inline void SetPrincipal(const char* value) { m_principalHasBeenSet = true; m_principal.assign(value); } /** *

The Amazon Web Services service or identity that receives the permission. At * this time, the only valid principal is acm.amazonaws.com.

*/ inline CreatePermissionRequest& WithPrincipal(const Aws::String& value) { SetPrincipal(value); return *this;} /** *

The Amazon Web Services service or identity that receives the permission. At * this time, the only valid principal is acm.amazonaws.com.

*/ inline CreatePermissionRequest& WithPrincipal(Aws::String&& value) { SetPrincipal(std::move(value)); return *this;} /** *

The Amazon Web Services service or identity that receives the permission. At * this time, the only valid principal is acm.amazonaws.com.

*/ inline CreatePermissionRequest& WithPrincipal(const char* value) { SetPrincipal(value); return *this;} /** *

The ID of the calling account.

*/ inline const Aws::String& GetSourceAccount() const{ return m_sourceAccount; } /** *

The ID of the calling account.

*/ inline bool SourceAccountHasBeenSet() const { return m_sourceAccountHasBeenSet; } /** *

The ID of the calling account.

*/ inline void SetSourceAccount(const Aws::String& value) { m_sourceAccountHasBeenSet = true; m_sourceAccount = value; } /** *

The ID of the calling account.

*/ inline void SetSourceAccount(Aws::String&& value) { m_sourceAccountHasBeenSet = true; m_sourceAccount = std::move(value); } /** *

The ID of the calling account.

*/ inline void SetSourceAccount(const char* value) { m_sourceAccountHasBeenSet = true; m_sourceAccount.assign(value); } /** *

The ID of the calling account.

*/ inline CreatePermissionRequest& WithSourceAccount(const Aws::String& value) { SetSourceAccount(value); return *this;} /** *

The ID of the calling account.

*/ inline CreatePermissionRequest& WithSourceAccount(Aws::String&& value) { SetSourceAccount(std::move(value)); return *this;} /** *

The ID of the calling account.

*/ inline CreatePermissionRequest& WithSourceAccount(const char* value) { SetSourceAccount(value); return *this;} /** *

The actions that the specified Amazon Web Services service principal can use. * These include IssueCertificate, GetCertificate, and * ListPermissions.

*/ inline const Aws::Vector& GetActions() const{ return m_actions; } /** *

The actions that the specified Amazon Web Services service principal can use. * These include IssueCertificate, GetCertificate, and * ListPermissions.

*/ inline bool ActionsHasBeenSet() const { return m_actionsHasBeenSet; } /** *

The actions that the specified Amazon Web Services service principal can use. * These include IssueCertificate, GetCertificate, and * ListPermissions.

*/ inline void SetActions(const Aws::Vector& value) { m_actionsHasBeenSet = true; m_actions = value; } /** *

The actions that the specified Amazon Web Services service principal can use. * These include IssueCertificate, GetCertificate, and * ListPermissions.

*/ inline void SetActions(Aws::Vector&& value) { m_actionsHasBeenSet = true; m_actions = std::move(value); } /** *

The actions that the specified Amazon Web Services service principal can use. * These include IssueCertificate, GetCertificate, and * ListPermissions.

*/ inline CreatePermissionRequest& WithActions(const Aws::Vector& value) { SetActions(value); return *this;} /** *

The actions that the specified Amazon Web Services service principal can use. * These include IssueCertificate, GetCertificate, and * ListPermissions.

*/ inline CreatePermissionRequest& WithActions(Aws::Vector&& value) { SetActions(std::move(value)); return *this;} /** *

The actions that the specified Amazon Web Services service principal can use. * These include IssueCertificate, GetCertificate, and * ListPermissions.

*/ inline CreatePermissionRequest& AddActions(const ActionType& value) { m_actionsHasBeenSet = true; m_actions.push_back(value); return *this; } /** *

The actions that the specified Amazon Web Services service principal can use. * These include IssueCertificate, GetCertificate, and * ListPermissions.

*/ inline CreatePermissionRequest& AddActions(ActionType&& value) { m_actionsHasBeenSet = true; m_actions.push_back(std::move(value)); return *this; } private: Aws::String m_certificateAuthorityArn; bool m_certificateAuthorityArnHasBeenSet = false; Aws::String m_principal; bool m_principalHasBeenSet = false; Aws::String m_sourceAccount; bool m_sourceAccountHasBeenSet = false; Aws::Vector m_actions; bool m_actionsHasBeenSet = false; }; } // namespace Model } // namespace ACMPCA } // namespace Aws