/** * 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 namespace Aws { namespace Lightsail { namespace Model { /** */ class UpdateInstanceMetadataOptionsRequest : public LightsailRequest { public: AWS_LIGHTSAIL_API UpdateInstanceMetadataOptionsRequest(); // 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 "UpdateInstanceMetadataOptions"; } AWS_LIGHTSAIL_API Aws::String SerializePayload() const override; AWS_LIGHTSAIL_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

The name of the instance for which to update metadata parameters.

*/ inline const Aws::String& GetInstanceName() const{ return m_instanceName; } /** *

The name of the instance for which to update metadata parameters.

*/ inline bool InstanceNameHasBeenSet() const { return m_instanceNameHasBeenSet; } /** *

The name of the instance for which to update metadata parameters.

*/ inline void SetInstanceName(const Aws::String& value) { m_instanceNameHasBeenSet = true; m_instanceName = value; } /** *

The name of the instance for which to update metadata parameters.

*/ inline void SetInstanceName(Aws::String&& value) { m_instanceNameHasBeenSet = true; m_instanceName = std::move(value); } /** *

The name of the instance for which to update metadata parameters.

*/ inline void SetInstanceName(const char* value) { m_instanceNameHasBeenSet = true; m_instanceName.assign(value); } /** *

The name of the instance for which to update metadata parameters.

*/ inline UpdateInstanceMetadataOptionsRequest& WithInstanceName(const Aws::String& value) { SetInstanceName(value); return *this;} /** *

The name of the instance for which to update metadata parameters.

*/ inline UpdateInstanceMetadataOptionsRequest& WithInstanceName(Aws::String&& value) { SetInstanceName(std::move(value)); return *this;} /** *

The name of the instance for which to update metadata parameters.

*/ inline UpdateInstanceMetadataOptionsRequest& WithInstanceName(const char* value) { SetInstanceName(value); return *this;} /** *

The state of token usage for your instance metadata requests. If the * parameter is not specified in the request, the default state is * optional.

If the state is optional, you can * choose whether to retrieve instance metadata with a signed token header on your * request. If you retrieve the IAM role credentials without a token, the version * 1.0 role credentials are returned. If you retrieve the IAM role credentials by * using a valid signed token, the version 2.0 role credentials are returned.

*

If the state is required, you must send a signed token header * with all instance metadata retrieval requests. In this state, retrieving the IAM * role credential always returns the version 2.0 credentials. The version 1.0 * credentials are not available.

*/ inline const HttpTokens& GetHttpTokens() const{ return m_httpTokens; } /** *

The state of token usage for your instance metadata requests. If the * parameter is not specified in the request, the default state is * optional.

If the state is optional, you can * choose whether to retrieve instance metadata with a signed token header on your * request. If you retrieve the IAM role credentials without a token, the version * 1.0 role credentials are returned. If you retrieve the IAM role credentials by * using a valid signed token, the version 2.0 role credentials are returned.

*

If the state is required, you must send a signed token header * with all instance metadata retrieval requests. In this state, retrieving the IAM * role credential always returns the version 2.0 credentials. The version 1.0 * credentials are not available.

*/ inline bool HttpTokensHasBeenSet() const { return m_httpTokensHasBeenSet; } /** *

The state of token usage for your instance metadata requests. If the * parameter is not specified in the request, the default state is * optional.

If the state is optional, you can * choose whether to retrieve instance metadata with a signed token header on your * request. If you retrieve the IAM role credentials without a token, the version * 1.0 role credentials are returned. If you retrieve the IAM role credentials by * using a valid signed token, the version 2.0 role credentials are returned.

*

If the state is required, you must send a signed token header * with all instance metadata retrieval requests. In this state, retrieving the IAM * role credential always returns the version 2.0 credentials. The version 1.0 * credentials are not available.

*/ inline void SetHttpTokens(const HttpTokens& value) { m_httpTokensHasBeenSet = true; m_httpTokens = value; } /** *

The state of token usage for your instance metadata requests. If the * parameter is not specified in the request, the default state is * optional.

If the state is optional, you can * choose whether to retrieve instance metadata with a signed token header on your * request. If you retrieve the IAM role credentials without a token, the version * 1.0 role credentials are returned. If you retrieve the IAM role credentials by * using a valid signed token, the version 2.0 role credentials are returned.

*

If the state is required, you must send a signed token header * with all instance metadata retrieval requests. In this state, retrieving the IAM * role credential always returns the version 2.0 credentials. The version 1.0 * credentials are not available.

*/ inline void SetHttpTokens(HttpTokens&& value) { m_httpTokensHasBeenSet = true; m_httpTokens = std::move(value); } /** *

The state of token usage for your instance metadata requests. If the * parameter is not specified in the request, the default state is * optional.

If the state is optional, you can * choose whether to retrieve instance metadata with a signed token header on your * request. If you retrieve the IAM role credentials without a token, the version * 1.0 role credentials are returned. If you retrieve the IAM role credentials by * using a valid signed token, the version 2.0 role credentials are returned.

*

If the state is required, you must send a signed token header * with all instance metadata retrieval requests. In this state, retrieving the IAM * role credential always returns the version 2.0 credentials. The version 1.0 * credentials are not available.

*/ inline UpdateInstanceMetadataOptionsRequest& WithHttpTokens(const HttpTokens& value) { SetHttpTokens(value); return *this;} /** *

The state of token usage for your instance metadata requests. If the * parameter is not specified in the request, the default state is * optional.

If the state is optional, you can * choose whether to retrieve instance metadata with a signed token header on your * request. If you retrieve the IAM role credentials without a token, the version * 1.0 role credentials are returned. If you retrieve the IAM role credentials by * using a valid signed token, the version 2.0 role credentials are returned.

*

If the state is required, you must send a signed token header * with all instance metadata retrieval requests. In this state, retrieving the IAM * role credential always returns the version 2.0 credentials. The version 1.0 * credentials are not available.

*/ inline UpdateInstanceMetadataOptionsRequest& WithHttpTokens(HttpTokens&& value) { SetHttpTokens(std::move(value)); return *this;} /** *

Enables or disables the HTTP metadata endpoint on your instances. If this * parameter is not specified, the existing state is maintained.

If you * specify a value of disabled, you cannot access your instance * metadata.

*/ inline const HttpEndpoint& GetHttpEndpoint() const{ return m_httpEndpoint; } /** *

Enables or disables the HTTP metadata endpoint on your instances. If this * parameter is not specified, the existing state is maintained.

If you * specify a value of disabled, you cannot access your instance * metadata.

*/ inline bool HttpEndpointHasBeenSet() const { return m_httpEndpointHasBeenSet; } /** *

Enables or disables the HTTP metadata endpoint on your instances. If this * parameter is not specified, the existing state is maintained.

If you * specify a value of disabled, you cannot access your instance * metadata.

*/ inline void SetHttpEndpoint(const HttpEndpoint& value) { m_httpEndpointHasBeenSet = true; m_httpEndpoint = value; } /** *

Enables or disables the HTTP metadata endpoint on your instances. If this * parameter is not specified, the existing state is maintained.

If you * specify a value of disabled, you cannot access your instance * metadata.

*/ inline void SetHttpEndpoint(HttpEndpoint&& value) { m_httpEndpointHasBeenSet = true; m_httpEndpoint = std::move(value); } /** *

Enables or disables the HTTP metadata endpoint on your instances. If this * parameter is not specified, the existing state is maintained.

If you * specify a value of disabled, you cannot access your instance * metadata.

*/ inline UpdateInstanceMetadataOptionsRequest& WithHttpEndpoint(const HttpEndpoint& value) { SetHttpEndpoint(value); return *this;} /** *

Enables or disables the HTTP metadata endpoint on your instances. If this * parameter is not specified, the existing state is maintained.

If you * specify a value of disabled, you cannot access your instance * metadata.

*/ inline UpdateInstanceMetadataOptionsRequest& WithHttpEndpoint(HttpEndpoint&& value) { SetHttpEndpoint(std::move(value)); return *this;} /** *

The desired HTTP PUT response hop limit for instance metadata requests. A * larger number means that the instance metadata requests can travel farther. If * no parameter is specified, the existing state is maintained.

*/ inline int GetHttpPutResponseHopLimit() const{ return m_httpPutResponseHopLimit; } /** *

The desired HTTP PUT response hop limit for instance metadata requests. A * larger number means that the instance metadata requests can travel farther. If * no parameter is specified, the existing state is maintained.

*/ inline bool HttpPutResponseHopLimitHasBeenSet() const { return m_httpPutResponseHopLimitHasBeenSet; } /** *

The desired HTTP PUT response hop limit for instance metadata requests. A * larger number means that the instance metadata requests can travel farther. If * no parameter is specified, the existing state is maintained.

*/ inline void SetHttpPutResponseHopLimit(int value) { m_httpPutResponseHopLimitHasBeenSet = true; m_httpPutResponseHopLimit = value; } /** *

The desired HTTP PUT response hop limit for instance metadata requests. A * larger number means that the instance metadata requests can travel farther. If * no parameter is specified, the existing state is maintained.

*/ inline UpdateInstanceMetadataOptionsRequest& WithHttpPutResponseHopLimit(int value) { SetHttpPutResponseHopLimit(value); return *this;} /** *

Enables or disables the IPv6 endpoint for the instance metadata service. This * setting applies only when the HTTP metadata endpoint is enabled.

*

This parameter is available only for instances in the Europe (Stockholm) * Amazon Web Services Region (eu-north-1).

*/ inline const HttpProtocolIpv6& GetHttpProtocolIpv6() const{ return m_httpProtocolIpv6; } /** *

Enables or disables the IPv6 endpoint for the instance metadata service. This * setting applies only when the HTTP metadata endpoint is enabled.

*

This parameter is available only for instances in the Europe (Stockholm) * Amazon Web Services Region (eu-north-1).

*/ inline bool HttpProtocolIpv6HasBeenSet() const { return m_httpProtocolIpv6HasBeenSet; } /** *

Enables or disables the IPv6 endpoint for the instance metadata service. This * setting applies only when the HTTP metadata endpoint is enabled.

*

This parameter is available only for instances in the Europe (Stockholm) * Amazon Web Services Region (eu-north-1).

*/ inline void SetHttpProtocolIpv6(const HttpProtocolIpv6& value) { m_httpProtocolIpv6HasBeenSet = true; m_httpProtocolIpv6 = value; } /** *

Enables or disables the IPv6 endpoint for the instance metadata service. This * setting applies only when the HTTP metadata endpoint is enabled.

*

This parameter is available only for instances in the Europe (Stockholm) * Amazon Web Services Region (eu-north-1).

*/ inline void SetHttpProtocolIpv6(HttpProtocolIpv6&& value) { m_httpProtocolIpv6HasBeenSet = true; m_httpProtocolIpv6 = std::move(value); } /** *

Enables or disables the IPv6 endpoint for the instance metadata service. This * setting applies only when the HTTP metadata endpoint is enabled.

*

This parameter is available only for instances in the Europe (Stockholm) * Amazon Web Services Region (eu-north-1).

*/ inline UpdateInstanceMetadataOptionsRequest& WithHttpProtocolIpv6(const HttpProtocolIpv6& value) { SetHttpProtocolIpv6(value); return *this;} /** *

Enables or disables the IPv6 endpoint for the instance metadata service. This * setting applies only when the HTTP metadata endpoint is enabled.

*

This parameter is available only for instances in the Europe (Stockholm) * Amazon Web Services Region (eu-north-1).

*/ inline UpdateInstanceMetadataOptionsRequest& WithHttpProtocolIpv6(HttpProtocolIpv6&& value) { SetHttpProtocolIpv6(std::move(value)); return *this;} private: Aws::String m_instanceName; bool m_instanceNameHasBeenSet = false; HttpTokens m_httpTokens; bool m_httpTokensHasBeenSet = false; HttpEndpoint m_httpEndpoint; bool m_httpEndpointHasBeenSet = false; int m_httpPutResponseHopLimit; bool m_httpPutResponseHopLimitHasBeenSet = false; HttpProtocolIpv6 m_httpProtocolIpv6; bool m_httpProtocolIpv6HasBeenSet = false; }; } // namespace Model } // namespace Lightsail } // namespace Aws