Describes the attributes for the specified listener.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { ElasticLoadBalancingV2Client, DescribeListenerAttributesCommand } from "@aws-sdk/client-elastic-load-balancing-v2"; // ES Modules import + * // const { ElasticLoadBalancingV2Client, DescribeListenerAttributesCommand } = require("@aws-sdk/client-elastic-load-balancing-v2"); // CommonJS import + * const client = new ElasticLoadBalancingV2Client(config); + * const input = { // DescribeListenerAttributesInput + * ListenerArn: "STRING_VALUE", // required + * }; + * const command = new DescribeListenerAttributesCommand(input); + * const response = await client.send(command); + * // { // DescribeListenerAttributesOutput + * // Attributes: [ // ListenerAttributes + * // { // ListenerAttribute + * // Key: "STRING_VALUE", + * // Value: "STRING_VALUE", + * // }, + * // ], + * // }; + * + * ``` + * + * @param DescribeListenerAttributesCommandInput - {@link DescribeListenerAttributesCommandInput} + * @returns {@link DescribeListenerAttributesCommandOutput} + * @see {@link DescribeListenerAttributesCommandInput} for command's `input` shape. + * @see {@link DescribeListenerAttributesCommandOutput} for command's `response` shape. + * @see {@link ElasticLoadBalancingV2ClientResolvedConfig | config} for ElasticLoadBalancingV2Client's `config` shape. + * + * @throws {@link ListenerNotFoundException} (client fault) + *The specified listener does not exist.
+ * + * @throws {@link ElasticLoadBalancingV2ServiceException} + *Base exception class for all service exceptions from ElasticLoadBalancingV2 service.
+ * + * @public + */ +export class DescribeListenerAttributesCommand extends $Command + .classBuilder< + DescribeListenerAttributesCommandInput, + DescribeListenerAttributesCommandOutput, + ElasticLoadBalancingV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep({ + ...commonParams, + }) + .m(function (this: any, Command: any, cs: any, config: ElasticLoadBalancingV2ClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("ElasticLoadBalancing_v10", "DescribeListenerAttributes", {}) + .n("ElasticLoadBalancingV2Client", "DescribeListenerAttributesCommand") + .f(void 0, void 0) + .ser(se_DescribeListenerAttributesCommand) + .de(de_DescribeListenerAttributesCommand) + .build() {} diff --git a/clients/client-elastic-load-balancing-v2/src/commands/ModifyListenerAttributesCommand.ts b/clients/client-elastic-load-balancing-v2/src/commands/ModifyListenerAttributesCommand.ts new file mode 100644 index 0000000000000..68b99ebd20ddf --- /dev/null +++ b/clients/client-elastic-load-balancing-v2/src/commands/ModifyListenerAttributesCommand.ts @@ -0,0 +1,103 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { + ElasticLoadBalancingV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../ElasticLoadBalancingV2Client"; +import { commonParams } from "../endpoint/EndpointParameters"; +import { ModifyListenerAttributesInput, ModifyListenerAttributesOutput } from "../models/models_0"; +import { de_ModifyListenerAttributesCommand, se_ModifyListenerAttributesCommand } from "../protocols/Aws_query"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link ModifyListenerAttributesCommand}. + */ +export interface ModifyListenerAttributesCommandInput extends ModifyListenerAttributesInput {} +/** + * @public + * + * The output of {@link ModifyListenerAttributesCommand}. + */ +export interface ModifyListenerAttributesCommandOutput extends ModifyListenerAttributesOutput, __MetadataBearer {} + +/** + *Modifies the specified attributes of the specified listener.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { ElasticLoadBalancingV2Client, ModifyListenerAttributesCommand } from "@aws-sdk/client-elastic-load-balancing-v2"; // ES Modules import + * // const { ElasticLoadBalancingV2Client, ModifyListenerAttributesCommand } = require("@aws-sdk/client-elastic-load-balancing-v2"); // CommonJS import + * const client = new ElasticLoadBalancingV2Client(config); + * const input = { // ModifyListenerAttributesInput + * ListenerArn: "STRING_VALUE", // required + * Attributes: [ // ListenerAttributes // required + * { // ListenerAttribute + * Key: "STRING_VALUE", + * Value: "STRING_VALUE", + * }, + * ], + * }; + * const command = new ModifyListenerAttributesCommand(input); + * const response = await client.send(command); + * // { // ModifyListenerAttributesOutput + * // Attributes: [ // ListenerAttributes + * // { // ListenerAttribute + * // Key: "STRING_VALUE", + * // Value: "STRING_VALUE", + * // }, + * // ], + * // }; + * + * ``` + * + * @param ModifyListenerAttributesCommandInput - {@link ModifyListenerAttributesCommandInput} + * @returns {@link ModifyListenerAttributesCommandOutput} + * @see {@link ModifyListenerAttributesCommandInput} for command's `input` shape. + * @see {@link ModifyListenerAttributesCommandOutput} for command's `response` shape. + * @see {@link ElasticLoadBalancingV2ClientResolvedConfig | config} for ElasticLoadBalancingV2Client's `config` shape. + * + * @throws {@link InvalidConfigurationRequestException} (client fault) + *The requested configuration is not valid.
+ * + * @throws {@link ListenerNotFoundException} (client fault) + *The specified listener does not exist.
+ * + * @throws {@link ElasticLoadBalancingV2ServiceException} + *Base exception class for all service exceptions from ElasticLoadBalancingV2 service.
+ * + * @public + */ +export class ModifyListenerAttributesCommand extends $Command + .classBuilder< + ModifyListenerAttributesCommandInput, + ModifyListenerAttributesCommandOutput, + ElasticLoadBalancingV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep({ + ...commonParams, + }) + .m(function (this: any, Command: any, cs: any, config: ElasticLoadBalancingV2ClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("ElasticLoadBalancing_v10", "ModifyListenerAttributes", {}) + .n("ElasticLoadBalancingV2Client", "ModifyListenerAttributesCommand") + .f(void 0, void 0) + .ser(se_ModifyListenerAttributesCommand) + .de(de_ModifyListenerAttributesCommand) + .build() {} diff --git a/clients/client-elastic-load-balancing-v2/src/commands/index.ts b/clients/client-elastic-load-balancing-v2/src/commands/index.ts index 5184d38d0e094..394a3515c90df 100644 --- a/clients/client-elastic-load-balancing-v2/src/commands/index.ts +++ b/clients/client-elastic-load-balancing-v2/src/commands/index.ts @@ -15,6 +15,7 @@ export * from "./DeleteTargetGroupCommand"; export * from "./DeleteTrustStoreCommand"; export * from "./DeregisterTargetsCommand"; export * from "./DescribeAccountLimitsCommand"; +export * from "./DescribeListenerAttributesCommand"; export * from "./DescribeListenerCertificatesCommand"; export * from "./DescribeListenersCommand"; export * from "./DescribeLoadBalancerAttributesCommand"; @@ -31,6 +32,7 @@ export * from "./DescribeTrustStoresCommand"; export * from "./GetResourcePolicyCommand"; export * from "./GetTrustStoreCaCertificatesBundleCommand"; export * from "./GetTrustStoreRevocationContentCommand"; +export * from "./ModifyListenerAttributesCommand"; export * from "./ModifyListenerCommand"; export * from "./ModifyLoadBalancerAttributesCommand"; export * from "./ModifyRuleCommand"; diff --git a/clients/client-elastic-load-balancing-v2/src/models/models_0.ts b/clients/client-elastic-load-balancing-v2/src/models/models_0.ts index f594c365fc5bc..e815ac1564e98 100644 --- a/clients/client-elastic-load-balancing-v2/src/models/models_0.ts +++ b/clients/client-elastic-load-balancing-v2/src/models/models_0.ts @@ -3566,6 +3566,54 @@ export interface DescribeAccountLimitsOutput { NextMarker?: string; } +/** + * @public + */ +export interface DescribeListenerAttributesInput { + /** + *The Amazon Resource Name (ARN) of the listener.
+ * @public + */ + ListenerArn: string | undefined; +} + +/** + *Information about a listener attribute.
+ * @public + */ +export interface ListenerAttribute { + /** + *The name of the attribute.
+ *The following attribute is supported by Network Load Balancers, and Gateway Load Balancers.
+ *
+ * tcp.idle_timeout.seconds
- The tcp idle timeout value, in seconds. The
+ * valid range is 60-6000 seconds. The default is 350 seconds.
The value of the attribute.
+ * @public + */ + Value?: string; +} + +/** + * @public + */ +export interface DescribeListenerAttributesOutput { + /** + *Information about the listener attributes.
+ * @public + */ + Attributes?: ListenerAttribute[]; +} + /** * @public */ @@ -5023,6 +5071,34 @@ export interface ModifyListenerOutput { Listeners?: Listener[]; } +/** + * @public + */ +export interface ModifyListenerAttributesInput { + /** + *The Amazon Resource Name (ARN) of the listener.
+ * @public + */ + ListenerArn: string | undefined; + + /** + *The listener attributes.
+ * @public + */ + Attributes: ListenerAttribute[] | undefined; +} + +/** + * @public + */ +export interface ModifyListenerAttributesOutput { + /** + *Information about the listener attributes.
+ * @public + */ + Attributes?: ListenerAttribute[]; +} + /** * @public */ @@ -5186,7 +5262,7 @@ export interface ModifyTargetGroupAttributesInput { TargetGroupArn: string | undefined; /** - *The attributes.
+ *The target group attributes.
* @public */ Attributes: TargetGroupAttribute[] | undefined; @@ -5197,7 +5273,7 @@ export interface ModifyTargetGroupAttributesInput { */ export interface ModifyTargetGroupAttributesOutput { /** - *Information about the attributes.
+ *Information about the target group attributes.
* @public */ Attributes?: TargetGroupAttribute[]; diff --git a/clients/client-elastic-load-balancing-v2/src/protocols/Aws_query.ts b/clients/client-elastic-load-balancing-v2/src/protocols/Aws_query.ts index cc4eca1bfec00..ca7f4319b4c9b 100644 --- a/clients/client-elastic-load-balancing-v2/src/protocols/Aws_query.ts +++ b/clients/client-elastic-load-balancing-v2/src/protocols/Aws_query.ts @@ -49,6 +49,10 @@ import { DescribeAccountLimitsCommandInput, DescribeAccountLimitsCommandOutput, } from "../commands/DescribeAccountLimitsCommand"; +import { + DescribeListenerAttributesCommandInput, + DescribeListenerAttributesCommandOutput, +} from "../commands/DescribeListenerAttributesCommand"; import { DescribeListenerCertificatesCommandInput, DescribeListenerCertificatesCommandOutput, @@ -101,6 +105,10 @@ import { GetTrustStoreRevocationContentCommandInput, GetTrustStoreRevocationContentCommandOutput, } from "../commands/GetTrustStoreRevocationContentCommand"; +import { + ModifyListenerAttributesCommandInput, + ModifyListenerAttributesCommandOutput, +} from "../commands/ModifyListenerAttributesCommand"; import { ModifyListenerCommandInput, ModifyListenerCommandOutput } from "../commands/ModifyListenerCommand"; import { ModifyLoadBalancerAttributesCommandInput, @@ -174,6 +182,8 @@ import { DeregisterTargetsOutput, DescribeAccountLimitsInput, DescribeAccountLimitsOutput, + DescribeListenerAttributesInput, + DescribeListenerAttributesOutput, DescribeListenerCertificatesInput, DescribeListenerCertificatesOutput, DescribeListenersInput, @@ -230,6 +240,7 @@ import { InvalidTargetException, Limit, Listener, + ListenerAttribute, ListenerNotFoundException, LoadBalancer, LoadBalancerAddress, @@ -237,6 +248,8 @@ import { LoadBalancerNotFoundException, LoadBalancerState, Matcher, + ModifyListenerAttributesInput, + ModifyListenerAttributesOutput, ModifyListenerInput, ModifyListenerOutput, ModifyLoadBalancerAttributesInput, @@ -591,6 +604,23 @@ export const se_DescribeAccountLimitsCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +/** + * serializeAws_queryDescribeListenerAttributesCommand + */ +export const se_DescribeListenerAttributesCommand = async ( + input: DescribeListenerAttributesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = SHARED_HEADERS; + let body: any; + body = buildFormUrlencodedString({ + ...se_DescribeListenerAttributesInput(input, context), + [_A]: _DLA, + [_V]: _, + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + /** * serializeAws_queryDescribeListenerCertificatesCommand */ @@ -880,6 +910,23 @@ export const se_ModifyListenerCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +/** + * serializeAws_queryModifyListenerAttributesCommand + */ +export const se_ModifyListenerAttributesCommand = async ( + input: ModifyListenerAttributesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = SHARED_HEADERS; + let body: any; + body = buildFormUrlencodedString({ + ...se_ModifyListenerAttributesInput(input, context), + [_A]: _MLA, + [_V]: _, + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + /** * serializeAws_queryModifyLoadBalancerAttributesCommand */ @@ -1421,6 +1468,26 @@ export const de_DescribeAccountLimitsCommand = async ( return response; }; +/** + * deserializeAws_queryDescribeListenerAttributesCommand + */ +export const de_DescribeListenerAttributesCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): PromiseDescribes the attributes for the specified listener.
", + "smithy.api#examples": [ + { + "title": "Describe listener attributes", + "documentation": "This example describes the attributes of the specified listener.", + "input": { + "ListenerArn": "aws:elasticloadbalancing:us-east-1:123456789012:listener/net/my-listener/73e2d6bc24d8a067/d5dc06411fa5bcea" + }, + "output": {} + } + ] + } + }, + "com.amazonaws.elasticloadbalancingv2#DescribeListenerAttributesInput": { + "type": "structure", + "members": { + "ListenerArn": { + "target": "com.amazonaws.elasticloadbalancingv2#ListenerArn", + "traits": { + "smithy.api#clientOptional": {}, + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the listener.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.elasticloadbalancingv2#DescribeListenerAttributesOutput": { + "type": "structure", + "members": { + "Attributes": { + "target": "com.amazonaws.elasticloadbalancingv2#ListenerAttributes", + "traits": { + "smithy.api#documentation": "Information about the listener attributes.
" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.elasticloadbalancingv2#DescribeListenerCertificates": { "type": "operation", "input": { @@ -3788,6 +3845,9 @@ { "target": "com.amazonaws.elasticloadbalancingv2#DescribeAccountLimits" }, + { + "target": "com.amazonaws.elasticloadbalancingv2#DescribeListenerAttributes" + }, { "target": "com.amazonaws.elasticloadbalancingv2#DescribeListenerCertificates" }, @@ -3839,6 +3899,9 @@ { "target": "com.amazonaws.elasticloadbalancingv2#ModifyListener" }, + { + "target": "com.amazonaws.elasticloadbalancingv2#ModifyListenerAttributes" + }, { "target": "com.amazonaws.elasticloadbalancingv2#ModifyLoadBalancerAttributes" }, @@ -5576,6 +5639,45 @@ "target": "com.amazonaws.elasticloadbalancingv2#ListenerArn" } }, + "com.amazonaws.elasticloadbalancingv2#ListenerAttribute": { + "type": "structure", + "members": { + "Key": { + "target": "com.amazonaws.elasticloadbalancingv2#ListenerAttributeKey", + "traits": { + "smithy.api#documentation": "The name of the attribute.
\nThe following attribute is supported by Network Load Balancers, and Gateway Load Balancers.
\n\n tcp.idle_timeout.seconds
- The tcp idle timeout value, in seconds. The \n valid range is 60-6000 seconds. The default is 350 seconds.
The value of the attribute.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Information about a listener attribute.
" + } + }, + "com.amazonaws.elasticloadbalancingv2#ListenerAttributeKey": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 256 + }, + "smithy.api#pattern": "^[a-zA-Z0-9._]+$" + } + }, + "com.amazonaws.elasticloadbalancingv2#ListenerAttributeValue": { + "type": "string" + }, + "com.amazonaws.elasticloadbalancingv2#ListenerAttributes": { + "type": "list", + "member": { + "target": "com.amazonaws.elasticloadbalancingv2#ListenerAttribute" + } + }, "com.amazonaws.elasticloadbalancingv2#ListenerNotFoundException": { "type": "structure", "members": { @@ -6095,6 +6197,64 @@ ] } }, + "com.amazonaws.elasticloadbalancingv2#ModifyListenerAttributes": { + "type": "operation", + "input": { + "target": "com.amazonaws.elasticloadbalancingv2#ModifyListenerAttributesInput" + }, + "output": { + "target": "com.amazonaws.elasticloadbalancingv2#ModifyListenerAttributesOutput" + }, + "errors": [ + { + "target": "com.amazonaws.elasticloadbalancingv2#InvalidConfigurationRequestException" + }, + { + "target": "com.amazonaws.elasticloadbalancingv2#ListenerNotFoundException" + } + ], + "traits": { + "smithy.api#documentation": "Modifies the specified attributes of the specified listener.
" + } + }, + "com.amazonaws.elasticloadbalancingv2#ModifyListenerAttributesInput": { + "type": "structure", + "members": { + "ListenerArn": { + "target": "com.amazonaws.elasticloadbalancingv2#ListenerArn", + "traits": { + "smithy.api#clientOptional": {}, + "smithy.api#documentation": "The Amazon Resource Name (ARN) of the listener.
", + "smithy.api#required": {} + } + }, + "Attributes": { + "target": "com.amazonaws.elasticloadbalancingv2#ListenerAttributes", + "traits": { + "smithy.api#clientOptional": {}, + "smithy.api#documentation": "The listener attributes.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.elasticloadbalancingv2#ModifyListenerAttributesOutput": { + "type": "structure", + "members": { + "Attributes": { + "target": "com.amazonaws.elasticloadbalancingv2#ListenerAttributes", + "traits": { + "smithy.api#documentation": "Information about the listener attributes.
" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.elasticloadbalancingv2#ModifyListenerInput": { "type": "structure", "members": { @@ -6595,7 +6755,7 @@ "target": "com.amazonaws.elasticloadbalancingv2#TargetGroupAttributes", "traits": { "smithy.api#clientOptional": {}, - "smithy.api#documentation": "The attributes.
", + "smithy.api#documentation": "The target group attributes.
", "smithy.api#required": {} } } @@ -6610,7 +6770,7 @@ "Attributes": { "target": "com.amazonaws.elasticloadbalancingv2#TargetGroupAttributes", "traits": { - "smithy.api#documentation": "Information about the attributes.
" + "smithy.api#documentation": "Information about the target group attributes.
" } } },