文件 AWS 開發套件範例 GitHub 儲存庫中有更多可用的 AWS SDK 範例
本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
ResendValidationEmail
搭配 AWS SDK 或 CLI 使用
下列程式碼範例示範如何使用 ResendValidationEmail
。
動作範例是大型程式的程式碼摘錄,必須在內容中執行。您可以在下列程式碼範例的內容中看到此動作:
- SDK for C++
-
注意
GitHub 上提供更多範例。尋找完整範例,並了解如何在 AWS 程式碼範例儲存庫
中設定和執行。 //! Resend the email that requests domain ownership validation. /*! \param certificateArn: The Amazon Resource Name (ARN) of a certificate. \param domainName: A fully qualified domain name. \param validationDomain: The base validation domain that will act as the suffix of the email addresses. \param clientConfiguration: AWS client configuration. \return bool: Function succeeded. */ bool AwsDoc::ACM::resendValidationEmail(const Aws::String &certificateArn, const Aws::String &domainName, const Aws::String &validationDomain, const Aws::Client::ClientConfiguration &clientConfiguration) { Aws::ACM::ACMClient acmClient(clientConfiguration); Aws::ACM::Model::ResendValidationEmailRequest request; request.WithCertificateArn(certificateArn) .WithDomain(domainName) .WithValidationDomain(validationDomain); Aws::ACM::Model::ResendValidationEmailOutcome outcome = acmClient.ResendValidationEmail(request); if (!outcome.IsSuccess()) { std::cerr << "ResendValidationEmail error: " << outcome.GetError().GetMessage() << std::endl; return false; } else { std::cout << "Success: The validation email has been resent." << std::endl; return true; } }
-
如需 API 詳細資訊,請參閱 AWS SDK for C++ API 參考中的 ResendValidationEmail。
-