/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.lightsail.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; /** * * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class UpdateInstanceMetadataOptionsRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* The name of the instance for which to update metadata parameters. *
*/ private String instanceName; /** *
* 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.
*
* 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.
*
* 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. *
*/ private Integer httpPutResponseHopLimit; /** ** 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
).
*
* The name of the instance for which to update metadata parameters. *
* * @param instanceName * The name of the instance for which to update metadata parameters. */ public void setInstanceName(String instanceName) { this.instanceName = instanceName; } /** ** The name of the instance for which to update metadata parameters. *
* * @return The name of the instance for which to update metadata parameters. */ public String getInstanceName() { return this.instanceName; } /** ** The name of the instance for which to update metadata parameters. *
* * @param instanceName * The name of the instance for which to update metadata parameters. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateInstanceMetadataOptionsRequest withInstanceName(String instanceName) { setInstanceName(instanceName); 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.
*
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.
* @see HttpTokens
*/
public void setHttpTokens(String httpTokens) {
this.httpTokens = 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.
*
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.
* @see HttpTokens
*/
public String getHttpTokens() {
return this.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.
*
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.
* @return Returns a reference to this object so that method calls can be chained together.
* @see HttpTokens
*/
public UpdateInstanceMetadataOptionsRequest withHttpTokens(String httpTokens) {
setHttpTokens(httpTokens);
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.
*
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.
* @return Returns a reference to this object so that method calls can be chained together.
* @see HttpTokens
*/
public UpdateInstanceMetadataOptionsRequest withHttpTokens(HttpTokens httpTokens) {
this.httpTokens = httpTokens.toString();
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.
*
* If you specify a value of disabled
, you cannot access your instance metadata.
* @see HttpEndpoint
*/
public void setHttpEndpoint(String httpEndpoint) {
this.httpEndpoint = 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.
*
* If you specify a value of disabled
, you cannot access your instance metadata.
* @see HttpEndpoint
*/
public String getHttpEndpoint() {
return this.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.
*
* If you specify a value of disabled
, you cannot access your instance metadata.
* @return Returns a reference to this object so that method calls can be chained together.
* @see HttpEndpoint
*/
public UpdateInstanceMetadataOptionsRequest withHttpEndpoint(String httpEndpoint) {
setHttpEndpoint(httpEndpoint);
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.
*
* If you specify a value of disabled
, you cannot access your instance metadata.
* @return Returns a reference to this object so that method calls can be chained together.
* @see HttpEndpoint
*/
public UpdateInstanceMetadataOptionsRequest withHttpEndpoint(HttpEndpoint httpEndpoint) {
this.httpEndpoint = httpEndpoint.toString();
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. *
* * @param 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. */ public void setHttpPutResponseHopLimit(Integer httpPutResponseHopLimit) { this.httpPutResponseHopLimit = 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. *
* * @return 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. */ public Integer getHttpPutResponseHopLimit() { return this.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. *
* * @param 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. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateInstanceMetadataOptionsRequest withHttpPutResponseHopLimit(Integer httpPutResponseHopLimit) { setHttpPutResponseHopLimit(httpPutResponseHopLimit); 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
).
*
* This parameter is available only for instances in the Europe (Stockholm) Amazon Web Services Region (
* eu-north-1
).
*
* 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
).
*
* This parameter is available only for instances in the Europe (Stockholm) Amazon Web Services Region (
* eu-north-1
).
*
* 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
).
*
* This parameter is available only for instances in the Europe (Stockholm) Amazon Web Services Region (
* eu-north-1
).
*
* 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
).
*
* This parameter is available only for instances in the Europe (Stockholm) Amazon Web Services Region (
* eu-north-1
).
*