There are more AWS SDK examples available in the AWS Doc SDK Examples
Use DescribeEndpoint
with an AWS SDK or CLI
The following code examples show how to use DescribeEndpoint
.
- SDK for C++
-
Note
There's more on GitHub. Find the complete example and learn how to set up and run in the AWS Code Examples Repository
. //! Describe the endpoint specific to the AWS account making the call. /*! \param endpointResult: String to receive the endpoint result. \param clientConfiguration: AWS client configuration. \return bool: Function succeeded. */ bool AwsDoc::IoT::describeEndpoint(Aws::String &endpointResult, const Aws::Client::ClientConfiguration &clientConfiguration) { Aws::String endpoint; Aws::IoT::IoTClient iotClient(clientConfiguration); Aws::IoT::Model::DescribeEndpointRequest describeEndpointRequest; describeEndpointRequest.SetEndpointType( "iot:Data-ATS"); // Recommended endpoint type. Aws::IoT::Model::DescribeEndpointOutcome outcome = iotClient.DescribeEndpoint( describeEndpointRequest); if (outcome.IsSuccess()) { std::cout << "Successfully described endpoint." << std::endl; endpointResult = outcome.GetResult().GetEndpointAddress(); } else { std::cerr << "Error describing endpoint" << outcome.GetError().GetMessage() << std::endl; } return outcome.IsSuccess(); }
-
For API details, see DescribeEndpoint in AWS SDK for C++ API Reference.
-