/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include The instance metadata options that apply to the HTTP requests that pipeline
* builds use to launch EC2 build and test instances. For more information about
* instance metadata options, see Configure
* the instance metadata options in the Amazon EC2 User Guide
* for Linux instances, or Configure
* the instance metadata options in the Amazon EC2 Windows Guide
* for Windows instances.See Also:
AWS
* API Reference
Indicates whether a signed token header is required for instance metadata * retrieval requests. The values affect the response as follows:
* required – When you retrieve the IAM role credentials, version 2.0 * credentials are returned in all cases.
optional – You * can include a signed token header in your request to retrieve instance metadata, * or you can leave it out. If you include it, version 2.0 credentials are returned * for the IAM role. Otherwise, version 1.0 credentials are returned.
The default setting is optional.
*/ inline const Aws::String& GetHttpTokens() const{ return m_httpTokens; } /** *Indicates whether a signed token header is required for instance metadata * retrieval requests. The values affect the response as follows:
* required – When you retrieve the IAM role credentials, version 2.0 * credentials are returned in all cases.
optional – You * can include a signed token header in your request to retrieve instance metadata, * or you can leave it out. If you include it, version 2.0 credentials are returned * for the IAM role. Otherwise, version 1.0 credentials are returned.
The default setting is optional.
*/ inline bool HttpTokensHasBeenSet() const { return m_httpTokensHasBeenSet; } /** *Indicates whether a signed token header is required for instance metadata * retrieval requests. The values affect the response as follows:
* required – When you retrieve the IAM role credentials, version 2.0 * credentials are returned in all cases.
optional – You * can include a signed token header in your request to retrieve instance metadata, * or you can leave it out. If you include it, version 2.0 credentials are returned * for the IAM role. Otherwise, version 1.0 credentials are returned.
The default setting is optional.
*/ inline void SetHttpTokens(const Aws::String& value) { m_httpTokensHasBeenSet = true; m_httpTokens = value; } /** *Indicates whether a signed token header is required for instance metadata * retrieval requests. The values affect the response as follows:
* required – When you retrieve the IAM role credentials, version 2.0 * credentials are returned in all cases.
optional – You * can include a signed token header in your request to retrieve instance metadata, * or you can leave it out. If you include it, version 2.0 credentials are returned * for the IAM role. Otherwise, version 1.0 credentials are returned.
The default setting is optional.
*/ inline void SetHttpTokens(Aws::String&& value) { m_httpTokensHasBeenSet = true; m_httpTokens = std::move(value); } /** *Indicates whether a signed token header is required for instance metadata * retrieval requests. The values affect the response as follows:
* required – When you retrieve the IAM role credentials, version 2.0 * credentials are returned in all cases.
optional – You * can include a signed token header in your request to retrieve instance metadata, * or you can leave it out. If you include it, version 2.0 credentials are returned * for the IAM role. Otherwise, version 1.0 credentials are returned.
The default setting is optional.
*/ inline void SetHttpTokens(const char* value) { m_httpTokensHasBeenSet = true; m_httpTokens.assign(value); } /** *Indicates whether a signed token header is required for instance metadata * retrieval requests. The values affect the response as follows:
* required – When you retrieve the IAM role credentials, version 2.0 * credentials are returned in all cases.
optional – You * can include a signed token header in your request to retrieve instance metadata, * or you can leave it out. If you include it, version 2.0 credentials are returned * for the IAM role. Otherwise, version 1.0 credentials are returned.
The default setting is optional.
*/ inline InstanceMetadataOptions& WithHttpTokens(const Aws::String& value) { SetHttpTokens(value); return *this;} /** *Indicates whether a signed token header is required for instance metadata * retrieval requests. The values affect the response as follows:
* required – When you retrieve the IAM role credentials, version 2.0 * credentials are returned in all cases.
optional – You * can include a signed token header in your request to retrieve instance metadata, * or you can leave it out. If you include it, version 2.0 credentials are returned * for the IAM role. Otherwise, version 1.0 credentials are returned.
The default setting is optional.
*/ inline InstanceMetadataOptions& WithHttpTokens(Aws::String&& value) { SetHttpTokens(std::move(value)); return *this;} /** *Indicates whether a signed token header is required for instance metadata * retrieval requests. The values affect the response as follows:
* required – When you retrieve the IAM role credentials, version 2.0 * credentials are returned in all cases.
optional – You * can include a signed token header in your request to retrieve instance metadata, * or you can leave it out. If you include it, version 2.0 credentials are returned * for the IAM role. Otherwise, version 1.0 credentials are returned.
The default setting is optional.
*/ inline InstanceMetadataOptions& WithHttpTokens(const char* value) { SetHttpTokens(value); return *this;} /** *Limit the number of hops that an instance metadata request can traverse to * reach its destination. The default is one hop. However, if HTTP tokens are * required, container image builds need a minimum of two hops.
*/ inline int GetHttpPutResponseHopLimit() const{ return m_httpPutResponseHopLimit; } /** *Limit the number of hops that an instance metadata request can traverse to * reach its destination. The default is one hop. However, if HTTP tokens are * required, container image builds need a minimum of two hops.
*/ inline bool HttpPutResponseHopLimitHasBeenSet() const { return m_httpPutResponseHopLimitHasBeenSet; } /** *Limit the number of hops that an instance metadata request can traverse to * reach its destination. The default is one hop. However, if HTTP tokens are * required, container image builds need a minimum of two hops.
*/ inline void SetHttpPutResponseHopLimit(int value) { m_httpPutResponseHopLimitHasBeenSet = true; m_httpPutResponseHopLimit = value; } /** *Limit the number of hops that an instance metadata request can traverse to * reach its destination. The default is one hop. However, if HTTP tokens are * required, container image builds need a minimum of two hops.
*/ inline InstanceMetadataOptions& WithHttpPutResponseHopLimit(int value) { SetHttpPutResponseHopLimit(value); return *this;} private: Aws::String m_httpTokens; bool m_httpTokensHasBeenSet = false; int m_httpPutResponseHopLimit; bool m_httpPutResponseHopLimitHasBeenSet = false; }; } // namespace Model } // namespace imagebuilder } // namespace Aws