elasticloadbalancing

package
v0.17.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2019 License: Apache-2.0 Imports: 7 Imported by: 99

Documentation

Overview

Package elasticloadbalancing provides the client and types for making API requests to Elastic Load Balancing.

A load balancer can distribute incoming traffic across your EC2 instances. This enables you to increase the availability of your application. The load balancer also monitors the health of its registered instances and ensures that it routes traffic only to healthy instances. You configure your load balancer to accept incoming traffic by specifying one or more listeners, which are configured with a protocol and port number for connections from clients to the load balancer and a protocol and port number for connections from the load balancer to the instances.

Elastic Load Balancing supports three types of load balancers: Application Load Balancers, Network Load Balancers, and Classic Load Balancers. You can select a load balancer based on your application needs. For more information, see the Elastic Load Balancing User Guide (http://docs.aws.amazon.com/elasticloadbalancing/latest/userguide/).

This reference covers the 2012-06-01 API, which supports Classic Load Balancers. The 2015-12-01 API supports Application Load Balancers and Network Load Balancers.

To get started, create a load balancer with one or more listeners using CreateLoadBalancer. Register your instances with the load balancer using RegisterInstancesWithLoadBalancer.

All Elastic Load Balancing operations are idempotent, which means that they complete at most one time. If you repeat an operation, it succeeds with a 200 OK response code.

See https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01 for more information on this service.

See elasticloadbalancing package documentation for more information. https://docs.aws.amazon.com/sdk-for-go/api/service/elasticloadbalancing/

Using the Client

To use Elastic Load Balancing with the SDK use the New function to create a new service client. With that client you can make API requests to the service. These clients are safe to use concurrently.

See the SDK's documentation for more information on how to use the SDK. https://docs.aws.amazon.com/sdk-for-go/api/

See aws.Config documentation for more information on configuring SDK clients. https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config

See the Elastic Load Balancing client for more information on creating client for this service. https://docs.aws.amazon.com/sdk-for-go/api/service/elasticloadbalancing/#New

Index

Examples

Constants

View Source
const (
	ServiceName = "Elastic Load Balancing" // Service's name
	ServiceID   = "ElasticLoadBalancing"   // Service's identifier
	EndpointsID = "elasticloadbalancing"   // Service's Endpoint identifier
)
View Source
const (

	// ErrCodeAccessPointNotFoundException for service response error code
	// "LoadBalancerNotFound".
	//
	// The specified load balancer does not exist.
	ErrCodeAccessPointNotFoundException = "LoadBalancerNotFound"

	// ErrCodeCertificateNotFoundException for service response error code
	// "CertificateNotFound".
	//
	// The specified ARN does not refer to a valid SSL certificate in AWS Identity
	// and Access Management (IAM) or AWS Certificate Manager (ACM). Note that if
	// you recently uploaded the certificate to IAM, this error might indicate that
	// the certificate is not fully available yet.
	ErrCodeCertificateNotFoundException = "CertificateNotFound"

	// ErrCodeDependencyThrottleException for service response error code
	// "DependencyThrottle".
	//
	// A request made by Elastic Load Balancing to another service exceeds the maximum
	// request rate permitted for your account.
	ErrCodeDependencyThrottleException = "DependencyThrottle"

	// ErrCodeDuplicateAccessPointNameException for service response error code
	// "DuplicateLoadBalancerName".
	//
	// The specified load balancer name already exists for this account.
	ErrCodeDuplicateAccessPointNameException = "DuplicateLoadBalancerName"

	// ErrCodeDuplicateListenerException for service response error code
	// "DuplicateListener".
	//
	// A listener already exists for the specified load balancer name and port,
	// but with a different instance port, protocol, or SSL certificate.
	ErrCodeDuplicateListenerException = "DuplicateListener"

	// ErrCodeDuplicatePolicyNameException for service response error code
	// "DuplicatePolicyName".
	//
	// A policy with the specified name already exists for this load balancer.
	ErrCodeDuplicatePolicyNameException = "DuplicatePolicyName"

	// ErrCodeDuplicateTagKeysException for service response error code
	// "DuplicateTagKeys".
	//
	// A tag key was specified more than once.
	ErrCodeDuplicateTagKeysException = "DuplicateTagKeys"

	// ErrCodeInvalidConfigurationRequestException for service response error code
	// "InvalidConfigurationRequest".
	//
	// The requested configuration change is not valid.
	ErrCodeInvalidConfigurationRequestException = "InvalidConfigurationRequest"

	// ErrCodeInvalidEndPointException for service response error code
	// "InvalidInstance".
	//
	// The specified endpoint is not valid.
	ErrCodeInvalidEndPointException = "InvalidInstance"

	// ErrCodeInvalidSchemeException for service response error code
	// "InvalidScheme".
	//
	// The specified value for the schema is not valid. You can only specify a scheme
	// for load balancers in a VPC.
	ErrCodeInvalidSchemeException = "InvalidScheme"

	// ErrCodeInvalidSecurityGroupException for service response error code
	// "InvalidSecurityGroup".
	//
	// One or more of the specified security groups do not exist.
	ErrCodeInvalidSecurityGroupException = "InvalidSecurityGroup"

	// ErrCodeInvalidSubnetException for service response error code
	// "InvalidSubnet".
	//
	// The specified VPC has no associated Internet gateway.
	ErrCodeInvalidSubnetException = "InvalidSubnet"

	// ErrCodeListenerNotFoundException for service response error code
	// "ListenerNotFound".
	//
	// The load balancer does not have a listener configured at the specified port.
	ErrCodeListenerNotFoundException = "ListenerNotFound"

	// ErrCodeLoadBalancerAttributeNotFoundException for service response error code
	// "LoadBalancerAttributeNotFound".
	//
	// The specified load balancer attribute does not exist.
	ErrCodeLoadBalancerAttributeNotFoundException = "LoadBalancerAttributeNotFound"

	// ErrCodeOperationNotPermittedException for service response error code
	// "OperationNotPermitted".
	//
	// This operation is not allowed.
	ErrCodeOperationNotPermittedException = "OperationNotPermitted"

	// ErrCodePolicyNotFoundException for service response error code
	// "PolicyNotFound".
	//
	// One or more of the specified policies do not exist.
	ErrCodePolicyNotFoundException = "PolicyNotFound"

	// ErrCodePolicyTypeNotFoundException for service response error code
	// "PolicyTypeNotFound".
	//
	// One or more of the specified policy types do not exist.
	ErrCodePolicyTypeNotFoundException = "PolicyTypeNotFound"

	// ErrCodeSubnetNotFoundException for service response error code
	// "SubnetNotFound".
	//
	// One or more of the specified subnets do not exist.
	ErrCodeSubnetNotFoundException = "SubnetNotFound"

	// ErrCodeTooManyAccessPointsException for service response error code
	// "TooManyLoadBalancers".
	//
	// The quota for the number of load balancers has been reached.
	ErrCodeTooManyAccessPointsException = "TooManyLoadBalancers"

	// ErrCodeTooManyPoliciesException for service response error code
	// "TooManyPolicies".
	//
	// The quota for the number of policies for this load balancer has been reached.
	ErrCodeTooManyPoliciesException = "TooManyPolicies"

	// ErrCodeTooManyTagsException for service response error code
	// "TooManyTags".
	//
	// The quota for the number of tags that can be assigned to a load balancer
	// has been reached.
	ErrCodeTooManyTagsException = "TooManyTags"

	// ErrCodeUnsupportedProtocolException for service response error code
	// "UnsupportedProtocol".
	//
	// The specified protocol or signature version is not supported.
	ErrCodeUnsupportedProtocolException = "UnsupportedProtocol"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessLog

type AccessLog struct {

	// The interval for publishing the access logs. You can specify an interval
	// of either 5 minutes or 60 minutes.
	//
	// Default: 60 minutes
	EmitInterval *int64 `type:"integer"`

	// Specifies whether access logs are enabled for the load balancer.
	//
	// Enabled is a required field
	Enabled *bool `type:"boolean" required:"true"`

	// The name of the Amazon S3 bucket where the access logs are stored.
	S3BucketName *string `type:"string"`

	// The logical hierarchy you created for your Amazon S3 bucket, for example
	// my-bucket-prefix/prod. If the prefix is not provided, the log is placed at
	// the root level of the bucket.
	S3BucketPrefix *string `type:"string"`
	// contains filtered or unexported fields
}

Information about the AccessLog attribute.

func (AccessLog) String

func (s AccessLog) String() string

String returns the string representation

func (*AccessLog) Validate

func (s *AccessLog) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type AddTagsInput

type AddTagsInput struct {

	// The name of the load balancer. You can specify one load balancer only.
	//
	// LoadBalancerNames is a required field
	LoadBalancerNames []string `type:"list" required:"true"`

	// The tags.
	//
	// Tags is a required field
	Tags []Tag `min:"1" type:"list" required:"true"`
	// contains filtered or unexported fields
}

Contains the parameters for AddTags.

func (AddTagsInput) String

func (s AddTagsInput) String() string

String returns the string representation

func (*AddTagsInput) Validate

func (s *AddTagsInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type AddTagsOutput

type AddTagsOutput struct {
	// contains filtered or unexported fields
}

Contains the output of AddTags.

func (AddTagsOutput) String

func (s AddTagsOutput) String() string

String returns the string representation

type AddTagsRequest

type AddTagsRequest struct {
	*aws.Request
	Input *AddTagsInput
	Copy  func(*AddTagsInput) AddTagsRequest
}

AddTagsRequest is the request type for the AddTags API operation.

func (AddTagsRequest) Send

Send marshals and sends the AddTags API request.

type AddTagsResponse

type AddTagsResponse struct {
	*AddTagsOutput
	// contains filtered or unexported fields
}

AddTagsResponse is the response type for the AddTags API operation.

func (*AddTagsResponse) SDKResponseMetdata

func (r *AddTagsResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the AddTags request.

type AdditionalAttribute

type AdditionalAttribute struct {

	// This parameter is reserved.
	Key *string `type:"string"`

	// This parameter is reserved.
	Value *string `type:"string"`
	// contains filtered or unexported fields
}

This data type is reserved.

func (AdditionalAttribute) String

func (s AdditionalAttribute) String() string

String returns the string representation

type AppCookieStickinessPolicy

type AppCookieStickinessPolicy struct {

	// The name of the application cookie used for stickiness.
	CookieName *string `type:"string"`

	// The mnemonic name for the policy being created. The name must be unique within
	// a set of policies for this load balancer.
	PolicyName *string `type:"string"`
	// contains filtered or unexported fields
}

Information about a policy for application-controlled session stickiness.

func (AppCookieStickinessPolicy) String

func (s AppCookieStickinessPolicy) String() string

String returns the string representation

type ApplySecurityGroupsToLoadBalancerInput

type ApplySecurityGroupsToLoadBalancerInput struct {

	// The name of the load balancer.
	//
	// LoadBalancerName is a required field
	LoadBalancerName *string `type:"string" required:"true"`

	// The IDs of the security groups to associate with the load balancer. Note
	// that you cannot specify the name of the security group.
	//
	// SecurityGroups is a required field
	SecurityGroups []string `type:"list" required:"true"`
	// contains filtered or unexported fields
}

Contains the parameters for ApplySecurityGroupsToLoadBalancer.

func (ApplySecurityGroupsToLoadBalancerInput) String

String returns the string representation

func (*ApplySecurityGroupsToLoadBalancerInput) Validate

Validate inspects the fields of the type to determine if they are valid.

type ApplySecurityGroupsToLoadBalancerOutput

type ApplySecurityGroupsToLoadBalancerOutput struct {

	// The IDs of the security groups associated with the load balancer.
	SecurityGroups []string `type:"list"`
	// contains filtered or unexported fields
}

Contains the output of ApplySecurityGroupsToLoadBalancer.

func (ApplySecurityGroupsToLoadBalancerOutput) String

String returns the string representation

type ApplySecurityGroupsToLoadBalancerRequest

ApplySecurityGroupsToLoadBalancerRequest is the request type for the ApplySecurityGroupsToLoadBalancer API operation.

func (ApplySecurityGroupsToLoadBalancerRequest) Send

Send marshals and sends the ApplySecurityGroupsToLoadBalancer API request.

type ApplySecurityGroupsToLoadBalancerResponse

type ApplySecurityGroupsToLoadBalancerResponse struct {
	*ApplySecurityGroupsToLoadBalancerOutput
	// contains filtered or unexported fields
}

ApplySecurityGroupsToLoadBalancerResponse is the response type for the ApplySecurityGroupsToLoadBalancer API operation.

func (*ApplySecurityGroupsToLoadBalancerResponse) SDKResponseMetdata

func (r *ApplySecurityGroupsToLoadBalancerResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the ApplySecurityGroupsToLoadBalancer request.

type AttachLoadBalancerToSubnetsInput

type AttachLoadBalancerToSubnetsInput struct {

	// The name of the load balancer.
	//
	// LoadBalancerName is a required field
	LoadBalancerName *string `type:"string" required:"true"`

	// The IDs of the subnets to add. You can add only one subnet per Availability
	// Zone.
	//
	// Subnets is a required field
	Subnets []string `type:"list" required:"true"`
	// contains filtered or unexported fields
}

Contains the parameters for AttachLoaBalancerToSubnets.

func (AttachLoadBalancerToSubnetsInput) String

String returns the string representation

func (*AttachLoadBalancerToSubnetsInput) Validate

Validate inspects the fields of the type to determine if they are valid.

type AttachLoadBalancerToSubnetsOutput

type AttachLoadBalancerToSubnetsOutput struct {

	// The IDs of the subnets attached to the load balancer.
	Subnets []string `type:"list"`
	// contains filtered or unexported fields
}

Contains the output of AttachLoadBalancerToSubnets.

func (AttachLoadBalancerToSubnetsOutput) String

String returns the string representation

type AttachLoadBalancerToSubnetsRequest

type AttachLoadBalancerToSubnetsRequest struct {
	*aws.Request
	Input *AttachLoadBalancerToSubnetsInput
	Copy  func(*AttachLoadBalancerToSubnetsInput) AttachLoadBalancerToSubnetsRequest
}

AttachLoadBalancerToSubnetsRequest is the request type for the AttachLoadBalancerToSubnets API operation.

func (AttachLoadBalancerToSubnetsRequest) Send

Send marshals and sends the AttachLoadBalancerToSubnets API request.

type AttachLoadBalancerToSubnetsResponse

type AttachLoadBalancerToSubnetsResponse struct {
	*AttachLoadBalancerToSubnetsOutput
	// contains filtered or unexported fields
}

AttachLoadBalancerToSubnetsResponse is the response type for the AttachLoadBalancerToSubnets API operation.

func (*AttachLoadBalancerToSubnetsResponse) SDKResponseMetdata

func (r *AttachLoadBalancerToSubnetsResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the AttachLoadBalancerToSubnets request.

type BackendServerDescription

type BackendServerDescription struct {

	// The port on which the EC2 instance is listening.
	InstancePort *int64 `min:"1" type:"integer"`

	// The names of the policies enabled for the EC2 instance.
	PolicyNames []string `type:"list"`
	// contains filtered or unexported fields
}

Information about the configuration of an EC2 instance.

func (BackendServerDescription) String

func (s BackendServerDescription) String() string

String returns the string representation

type Client

type Client struct {
	*aws.Client
}

Client provides the API operation methods for making requests to Elastic Load Balancing. See this package's package overview docs for details on the service.

The client's methods are safe to use concurrently. It is not safe to modify mutate any of the struct's properties though.

func New

func New(config aws.Config) *Client

New creates a new instance of the client from the provided Config.

Example:

// Create a client from just a config.
svc := elasticloadbalancing.New(myConfig)

func (*Client) AddTagsRequest

func (c *Client) AddTagsRequest(input *AddTagsInput) AddTagsRequest

AddTagsRequest returns a request value for making API operation for Elastic Load Balancing.

Adds the specified tags to the specified load balancer. Each load balancer can have a maximum of 10 tags.

Each tag consists of a key and an optional value. If a tag with the same key is already associated with the load balancer, AddTags updates its value.

For more information, see Tag Your Classic Load Balancer (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/add-remove-tags.html) in the Classic Load Balancers Guide.

// Example sending a request using AddTagsRequest.
req := client.AddTagsRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/AddTags

Example (Shared00)

To add tags to a load balancer

This example adds two tags to the specified load balancer.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := elasticloadbalancing.New(cfg)
	input := &elasticloadbalancing.AddTagsInput{
		LoadBalancerNames: []string{
			"my-load-balancer",
		},
		Tags: []elasticloadbalancing.Tag{
			{
				Key:   aws.String("project"),
				Value: aws.String("lima"),
			},
			{
				Key:   aws.String("department"),
				Value: aws.String("digital-media"),
			},
		},
	}

	req := svc.AddTagsRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case elasticloadbalancing.ErrCodeAccessPointNotFoundException:
				fmt.Println(elasticloadbalancing.ErrCodeAccessPointNotFoundException, aerr.Error())
			case elasticloadbalancing.ErrCodeTooManyTagsException:
				fmt.Println(elasticloadbalancing.ErrCodeTooManyTagsException, aerr.Error())
			case elasticloadbalancing.ErrCodeDuplicateTagKeysException:
				fmt.Println(elasticloadbalancing.ErrCodeDuplicateTagKeysException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*Client) ApplySecurityGroupsToLoadBalancerRequest

func (c *Client) ApplySecurityGroupsToLoadBalancerRequest(input *ApplySecurityGroupsToLoadBalancerInput) ApplySecurityGroupsToLoadBalancerRequest

ApplySecurityGroupsToLoadBalancerRequest returns a request value for making API operation for Elastic Load Balancing.

Associates one or more security groups with your load balancer in a virtual private cloud (VPC). The specified security groups override the previously associated security groups.

For more information, see Security Groups for Load Balancers in a VPC (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-security-groups.html#elb-vpc-security-groups) in the Classic Load Balancers Guide.

// Example sending a request using ApplySecurityGroupsToLoadBalancerRequest.
req := client.ApplySecurityGroupsToLoadBalancerRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/ApplySecurityGroupsToLoadBalancer

Example (Shared00)

To associate a security group with a load balancer in a VPC

This example associates a security group with the specified load balancer in a VPC.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := elasticloadbalancing.New(cfg)
	input := &elasticloadbalancing.ApplySecurityGroupsToLoadBalancerInput{
		LoadBalancerName: aws.String("my-load-balancer"),
		SecurityGroups: []string{
			"sg-fc448899",
		},
	}

	req := svc.ApplySecurityGroupsToLoadBalancerRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case elasticloadbalancing.ErrCodeAccessPointNotFoundException:
				fmt.Println(elasticloadbalancing.ErrCodeAccessPointNotFoundException, aerr.Error())
			case elasticloadbalancing.ErrCodeInvalidConfigurationRequestException:
				fmt.Println(elasticloadbalancing.ErrCodeInvalidConfigurationRequestException, aerr.Error())
			case elasticloadbalancing.ErrCodeInvalidSecurityGroupException:
				fmt.Println(elasticloadbalancing.ErrCodeInvalidSecurityGroupException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*Client) AttachLoadBalancerToSubnetsRequest

func (c *Client) AttachLoadBalancerToSubnetsRequest(input *AttachLoadBalancerToSubnetsInput) AttachLoadBalancerToSubnetsRequest

AttachLoadBalancerToSubnetsRequest returns a request value for making API operation for Elastic Load Balancing.

Adds one or more subnets to the set of configured subnets for the specified load balancer.

The load balancer evenly distributes requests across all registered subnets. For more information, see Add or Remove Subnets for Your Load Balancer in a VPC (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-manage-subnets.html) in the Classic Load Balancers Guide.

// Example sending a request using AttachLoadBalancerToSubnetsRequest.
req := client.AttachLoadBalancerToSubnetsRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/AttachLoadBalancerToSubnets

Example (Shared00)

To attach subnets to a load balancer

This example adds the specified subnet to the set of configured subnets for the specified load balancer.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := elasticloadbalancing.New(cfg)
	input := &elasticloadbalancing.AttachLoadBalancerToSubnetsInput{
		LoadBalancerName: aws.String("my-load-balancer"),
		Subnets: []string{
			"subnet-0ecac448",
		},
	}

	req := svc.AttachLoadBalancerToSubnetsRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case elasticloadbalancing.ErrCodeAccessPointNotFoundException:
				fmt.Println(elasticloadbalancing.ErrCodeAccessPointNotFoundException, aerr.Error())
			case elasticloadbalancing.ErrCodeInvalidConfigurationRequestException:
				fmt.Println(elasticloadbalancing.ErrCodeInvalidConfigurationRequestException, aerr.Error())
			case elasticloadbalancing.ErrCodeSubnetNotFoundException:
				fmt.Println(elasticloadbalancing.ErrCodeSubnetNotFoundException, aerr.Error())
			case elasticloadbalancing.ErrCodeInvalidSubnetException:
				fmt.Println(elasticloadbalancing.ErrCodeInvalidSubnetException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*Client) ConfigureHealthCheckRequest

func (c *Client) ConfigureHealthCheckRequest(input *ConfigureHealthCheckInput) ConfigureHealthCheckRequest

ConfigureHealthCheckRequest returns a request value for making API operation for Elastic Load Balancing.

Specifies the health check settings to use when evaluating the health state of your EC2 instances.

For more information, see Configure Health Checks for Your Load Balancer (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-healthchecks.html) in the Classic Load Balancers Guide.

// Example sending a request using ConfigureHealthCheckRequest.
req := client.ConfigureHealthCheckRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/ConfigureHealthCheck

Example (Shared00)

To specify the health check settings for your backend EC2 instances

This example specifies the health check settings used to evaluate the health of your backend EC2 instances.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := elasticloadbalancing.New(cfg)
	input := &elasticloadbalancing.ConfigureHealthCheckInput{
		HealthCheck: &elasticloadbalancing.HealthCheck{
			HealthyThreshold:   aws.Int64(2),
			Interval:           aws.Int64(30),
			Target:             aws.String("HTTP:80/png"),
			Timeout:            aws.Int64(3),
			UnhealthyThreshold: aws.Int64(2),
		},
		LoadBalancerName: aws.String("my-load-balancer"),
	}

	req := svc.ConfigureHealthCheckRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case elasticloadbalancing.ErrCodeAccessPointNotFoundException:
				fmt.Println(elasticloadbalancing.ErrCodeAccessPointNotFoundException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*Client) CreateAppCookieStickinessPolicyRequest

func (c *Client) CreateAppCookieStickinessPolicyRequest(input *CreateAppCookieStickinessPolicyInput) CreateAppCookieStickinessPolicyRequest

CreateAppCookieStickinessPolicyRequest returns a request value for making API operation for Elastic Load Balancing.

Generates a stickiness policy with sticky session lifetimes that follow that of an application-generated cookie. This policy can be associated only with HTTP/HTTPS listeners.

This policy is similar to the policy created by CreateLBCookieStickinessPolicy, except that the lifetime of the special Elastic Load Balancing cookie, AWSELB, follows the lifetime of the application-generated cookie specified in the policy configuration. The load balancer only inserts a new stickiness cookie when the application response includes a new application cookie.

If the application cookie is explicitly removed or expires, the session stops being sticky until a new application cookie is issued.

For more information, see Application-Controlled Session Stickiness (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-sticky-sessions.html#enable-sticky-sessions-application) in the Classic Load Balancers Guide.

// Example sending a request using CreateAppCookieStickinessPolicyRequest.
req := client.CreateAppCookieStickinessPolicyRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/CreateAppCookieStickinessPolicy

Example (Shared00)

To generate a stickiness policy for your load balancer

This example generates a stickiness policy that follows the sticky session lifetimes of the application-generated cookie.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := elasticloadbalancing.New(cfg)
	input := &elasticloadbalancing.CreateAppCookieStickinessPolicyInput{
		CookieName:       aws.String("my-app-cookie"),
		LoadBalancerName: aws.String("my-load-balancer"),
		PolicyName:       aws.String("my-app-cookie-policy"),
	}

	req := svc.CreateAppCookieStickinessPolicyRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case elasticloadbalancing.ErrCodeAccessPointNotFoundException:
				fmt.Println(elasticloadbalancing.ErrCodeAccessPointNotFoundException, aerr.Error())
			case elasticloadbalancing.ErrCodeDuplicatePolicyNameException:
				fmt.Println(elasticloadbalancing.ErrCodeDuplicatePolicyNameException, aerr.Error())
			case elasticloadbalancing.ErrCodeTooManyPoliciesException:
				fmt.Println(elasticloadbalancing.ErrCodeTooManyPoliciesException, aerr.Error())
			case elasticloadbalancing.ErrCodeInvalidConfigurationRequestException:
				fmt.Println(elasticloadbalancing.ErrCodeInvalidConfigurationRequestException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*Client) CreateLBCookieStickinessPolicyRequest

func (c *Client) CreateLBCookieStickinessPolicyRequest(input *CreateLBCookieStickinessPolicyInput) CreateLBCookieStickinessPolicyRequest

CreateLBCookieStickinessPolicyRequest returns a request value for making API operation for Elastic Load Balancing.

Generates a stickiness policy with sticky session lifetimes controlled by the lifetime of the browser (user-agent) or a specified expiration period. This policy can be associated only with HTTP/HTTPS listeners.

When a load balancer implements this policy, the load balancer uses a special cookie to track the instance for each request. When the load balancer receives a request, it first checks to see if this cookie is present in the request. If so, the load balancer sends the request to the application server specified in the cookie. If not, the load balancer sends the request to a server that is chosen based on the existing load-balancing algorithm.

A cookie is inserted into the response for binding subsequent requests from the same user to that server. The validity of the cookie is based on the cookie expiration time, which is specified in the policy configuration.

For more information, see Duration-Based Session Stickiness (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-sticky-sessions.html#enable-sticky-sessions-duration) in the Classic Load Balancers Guide.

// Example sending a request using CreateLBCookieStickinessPolicyRequest.
req := client.CreateLBCookieStickinessPolicyRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/CreateLBCookieStickinessPolicy

Example (Shared00)

To generate a duration-based stickiness policy for your load balancer

This example generates a stickiness policy with sticky session lifetimes controlled by the specified expiration period.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := elasticloadbalancing.New(cfg)
	input := &elasticloadbalancing.CreateLBCookieStickinessPolicyInput{
		CookieExpirationPeriod: aws.Int64(60),
		LoadBalancerName:       aws.String("my-load-balancer"),
		PolicyName:             aws.String("my-duration-cookie-policy"),
	}

	req := svc.CreateLBCookieStickinessPolicyRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case elasticloadbalancing.ErrCodeAccessPointNotFoundException:
				fmt.Println(elasticloadbalancing.ErrCodeAccessPointNotFoundException, aerr.Error())
			case elasticloadbalancing.ErrCodeDuplicatePolicyNameException:
				fmt.Println(elasticloadbalancing.ErrCodeDuplicatePolicyNameException, aerr.Error())
			case elasticloadbalancing.ErrCodeTooManyPoliciesException:
				fmt.Println(elasticloadbalancing.ErrCodeTooManyPoliciesException, aerr.Error())
			case elasticloadbalancing.ErrCodeInvalidConfigurationRequestException:
				fmt.Println(elasticloadbalancing.ErrCodeInvalidConfigurationRequestException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*Client) CreateLoadBalancerListenersRequest

func (c *Client) CreateLoadBalancerListenersRequest(input *CreateLoadBalancerListenersInput) CreateLoadBalancerListenersRequest

CreateLoadBalancerListenersRequest returns a request value for making API operation for Elastic Load Balancing.

Creates one or more listeners for the specified load balancer. If a listener with the specified port does not already exist, it is created; otherwise, the properties of the new listener must match the properties of the existing listener.

For more information, see Listeners for Your Classic Load Balancer (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-listener-config.html) in the Classic Load Balancers Guide.

// Example sending a request using CreateLoadBalancerListenersRequest.
req := client.CreateLoadBalancerListenersRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/CreateLoadBalancerListeners

Example (Shared00)

To create an HTTP listener for a load balancer

This example creates a listener for your load balancer at port 80 using the HTTP protocol.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := elasticloadbalancing.New(cfg)
	input := &elasticloadbalancing.CreateLoadBalancerListenersInput{
		Listeners: []elasticloadbalancing.Listener{
			{
				InstancePort:     aws.Int64(80),
				InstanceProtocol: aws.String("HTTP"),
				LoadBalancerPort: aws.Int64(80),
				Protocol:         aws.String("HTTP"),
			},
		},
		LoadBalancerName: aws.String("my-load-balancer"),
	}

	req := svc.CreateLoadBalancerListenersRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case elasticloadbalancing.ErrCodeAccessPointNotFoundException:
				fmt.Println(elasticloadbalancing.ErrCodeAccessPointNotFoundException, aerr.Error())
			case elasticloadbalancing.ErrCodeDuplicateListenerException:
				fmt.Println(elasticloadbalancing.ErrCodeDuplicateListenerException, aerr.Error())
			case elasticloadbalancing.ErrCodeCertificateNotFoundException:
				fmt.Println(elasticloadbalancing.ErrCodeCertificateNotFoundException, aerr.Error())
			case elasticloadbalancing.ErrCodeInvalidConfigurationRequestException:
				fmt.Println(elasticloadbalancing.ErrCodeInvalidConfigurationRequestException, aerr.Error())
			case elasticloadbalancing.ErrCodeUnsupportedProtocolException:
				fmt.Println(elasticloadbalancing.ErrCodeUnsupportedProtocolException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

Example (Shared01)

To create an HTTPS listener for a load balancer

This example creates a listener for your load balancer at port 443 using the HTTPS protocol.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := elasticloadbalancing.New(cfg)
	input := &elasticloadbalancing.CreateLoadBalancerListenersInput{
		Listeners: []elasticloadbalancing.Listener{
			{
				InstancePort:     aws.Int64(80),
				InstanceProtocol: aws.String("HTTP"),
				LoadBalancerPort: aws.Int64(443),
				Protocol:         aws.String("HTTPS"),
				SSLCertificateId: aws.String("arn:aws:iam::123456789012:server-certificate/my-server-cert"),
			},
		},
		LoadBalancerName: aws.String("my-load-balancer"),
	}

	req := svc.CreateLoadBalancerListenersRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case elasticloadbalancing.ErrCodeAccessPointNotFoundException:
				fmt.Println(elasticloadbalancing.ErrCodeAccessPointNotFoundException, aerr.Error())
			case elasticloadbalancing.ErrCodeDuplicateListenerException:
				fmt.Println(elasticloadbalancing.ErrCodeDuplicateListenerException, aerr.Error())
			case elasticloadbalancing.ErrCodeCertificateNotFoundException:
				fmt.Println(elasticloadbalancing.ErrCodeCertificateNotFoundException, aerr.Error())
			case elasticloadbalancing.ErrCodeInvalidConfigurationRequestException:
				fmt.Println(elasticloadbalancing.ErrCodeInvalidConfigurationRequestException, aerr.Error())
			case elasticloadbalancing.ErrCodeUnsupportedProtocolException:
				fmt.Println(elasticloadbalancing.ErrCodeUnsupportedProtocolException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*Client) CreateLoadBalancerPolicyRequest

func (c *Client) CreateLoadBalancerPolicyRequest(input *CreateLoadBalancerPolicyInput) CreateLoadBalancerPolicyRequest

CreateLoadBalancerPolicyRequest returns a request value for making API operation for Elastic Load Balancing.

Creates a policy with the specified attributes for the specified load balancer.

Policies are settings that are saved for your load balancer and that can be applied to the listener or the application server, depending on the policy type.

// Example sending a request using CreateLoadBalancerPolicyRequest.
req := client.CreateLoadBalancerPolicyRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/CreateLoadBalancerPolicy

Example (Shared00)

To create a policy that enables Proxy Protocol on a load balancer

This example creates a policy that enables Proxy Protocol on the specified load balancer.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := elasticloadbalancing.New(cfg)
	input := &elasticloadbalancing.CreateLoadBalancerPolicyInput{
		LoadBalancerName: aws.String("my-load-balancer"),
		PolicyAttributes: []elasticloadbalancing.PolicyAttribute{
			{
				AttributeName:  aws.String("ProxyProtocol"),
				AttributeValue: aws.String("true"),
			},
		},
		PolicyName:     aws.String("my-ProxyProtocol-policy"),
		PolicyTypeName: aws.String("ProxyProtocolPolicyType"),
	}

	req := svc.CreateLoadBalancerPolicyRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case elasticloadbalancing.ErrCodeAccessPointNotFoundException:
				fmt.Println(elasticloadbalancing.ErrCodeAccessPointNotFoundException, aerr.Error())
			case elasticloadbalancing.ErrCodePolicyTypeNotFoundException:
				fmt.Println(elasticloadbalancing.ErrCodePolicyTypeNotFoundException, aerr.Error())
			case elasticloadbalancing.ErrCodeDuplicatePolicyNameException:
				fmt.Println(elasticloadbalancing.ErrCodeDuplicatePolicyNameException, aerr.Error())
			case elasticloadbalancing.ErrCodeTooManyPoliciesException:
				fmt.Println(elasticloadbalancing.ErrCodeTooManyPoliciesException, aerr.Error())
			case elasticloadbalancing.ErrCodeInvalidConfigurationRequestException:
				fmt.Println(elasticloadbalancing.ErrCodeInvalidConfigurationRequestException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

Example (Shared01)

To create a public key policy

This example creates a public key policy.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := elasticloadbalancing.New(cfg)
	input := &elasticloadbalancing.CreateLoadBalancerPolicyInput{
		LoadBalancerName: aws.String("my-load-balancer"),
		PolicyAttributes: []elasticloadbalancing.PolicyAttribute{
			{
				AttributeName:  aws.String("PublicKey"),
				AttributeValue: aws.String("MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwAYUjnfyEyXr1pxjhFWBpMlggUcqoi3kl+dS74kj//c6x7ROtusUaeQCTgIUkayttRDWchuqo1pHC1u+n5xxXnBBe2ejbb2WRsKIQ5rXEeixsjFpFsojpSQKkzhVGI6mJVZBJDVKSHmswnwLBdofLhzvllpovBPTHe+o4haAWvDBALJU0pkSI1FecPHcs2hwxf14zHoXy1e2k36A64nXW43wtfx5qcVSIxtCEOjnYRg7RPvybaGfQ+v6Iaxb/+7J5kEvZhTFQId+bSiJImF1FSUT1W1xwzBZPUbcUkkXDj45vC2s3Z8E+Lk7a3uZhvsQHLZnrfuWjBWGWvZ/MhZYgEXAMPLE"),
			},
		},
		PolicyName:     aws.String("my-PublicKey-policy"),
		PolicyTypeName: aws.String("PublicKeyPolicyType"),
	}

	req := svc.CreateLoadBalancerPolicyRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case elasticloadbalancing.ErrCodeAccessPointNotFoundException:
				fmt.Println(elasticloadbalancing.ErrCodeAccessPointNotFoundException, aerr.Error())
			case elasticloadbalancing.ErrCodePolicyTypeNotFoundException:
				fmt.Println(elasticloadbalancing.ErrCodePolicyTypeNotFoundException, aerr.Error())
			case elasticloadbalancing.ErrCodeDuplicatePolicyNameException:
				fmt.Println(elasticloadbalancing.ErrCodeDuplicatePolicyNameException, aerr.Error())
			case elasticloadbalancing.ErrCodeTooManyPoliciesException:
				fmt.Println(elasticloadbalancing.ErrCodeTooManyPoliciesException, aerr.Error())
			case elasticloadbalancing.ErrCodeInvalidConfigurationRequestException:
				fmt.Println(elasticloadbalancing.ErrCodeInvalidConfigurationRequestException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

Example (Shared02)

To create a backend server authentication policy

This example creates a backend server authentication policy that enables authentication on your backend instance using a public key policy.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := elasticloadbalancing.New(cfg)
	input := &elasticloadbalancing.CreateLoadBalancerPolicyInput{
		LoadBalancerName: aws.String("my-load-balancer"),
		PolicyAttributes: []elasticloadbalancing.PolicyAttribute{
			{
				AttributeName:  aws.String("PublicKeyPolicyName"),
				AttributeValue: aws.String("my-PublicKey-policy"),
			},
		},
		PolicyName:     aws.String("my-authentication-policy"),
		PolicyTypeName: aws.String("BackendServerAuthenticationPolicyType"),
	}

	req := svc.CreateLoadBalancerPolicyRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case elasticloadbalancing.ErrCodeAccessPointNotFoundException:
				fmt.Println(elasticloadbalancing.ErrCodeAccessPointNotFoundException, aerr.Error())
			case elasticloadbalancing.ErrCodePolicyTypeNotFoundException:
				fmt.Println(elasticloadbalancing.ErrCodePolicyTypeNotFoundException, aerr.Error())
			case elasticloadbalancing.ErrCodeDuplicatePolicyNameException:
				fmt.Println(elasticloadbalancing.ErrCodeDuplicatePolicyNameException, aerr.Error())
			case elasticloadbalancing.ErrCodeTooManyPoliciesException:
				fmt.Println(elasticloadbalancing.ErrCodeTooManyPoliciesException, aerr.Error())
			case elasticloadbalancing.ErrCodeInvalidConfigurationRequestException:
				fmt.Println(elasticloadbalancing.ErrCodeInvalidConfigurationRequestException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*Client) CreateLoadBalancerRequest

func (c *Client) CreateLoadBalancerRequest(input *CreateLoadBalancerInput) CreateLoadBalancerRequest

CreateLoadBalancerRequest returns a request value for making API operation for Elastic Load Balancing.

Creates a Classic Load Balancer.

You can add listeners, security groups, subnets, and tags when you create your load balancer, or you can add them later using CreateLoadBalancerListeners, ApplySecurityGroupsToLoadBalancer, AttachLoadBalancerToSubnets, and AddTags.

To describe your current load balancers, see DescribeLoadBalancers. When you are finished with a load balancer, you can delete it using DeleteLoadBalancer.

You can create up to 20 load balancers per region per account. You can request an increase for the number of load balancers for your account. For more information, see Limits for Your Classic Load Balancer (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-limits.html) in the Classic Load Balancers Guide.

// Example sending a request using CreateLoadBalancerRequest.
req := client.CreateLoadBalancerRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/CreateLoadBalancer

Example (Shared00)

To create an HTTP load balancer in a VPC

This example creates a load balancer with an HTTP listener in a VPC.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := elasticloadbalancing.New(cfg)
	input := &elasticloadbalancing.CreateLoadBalancerInput{
		Listeners: []elasticloadbalancing.Listener{
			{
				InstancePort:     aws.Int64(80),
				InstanceProtocol: aws.String("HTTP"),
				LoadBalancerPort: aws.Int64(80),
				Protocol:         aws.String("HTTP"),
			},
		},
		LoadBalancerName: aws.String("my-load-balancer"),
		SecurityGroups: []string{
			"sg-a61988c3",
		},
		Subnets: []string{
			"subnet-15aaab61",
		},
	}

	req := svc.CreateLoadBalancerRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case elasticloadbalancing.ErrCodeDuplicateAccessPointNameException:
				fmt.Println(elasticloadbalancing.ErrCodeDuplicateAccessPointNameException, aerr.Error())
			case elasticloadbalancing.ErrCodeTooManyAccessPointsException:
				fmt.Println(elasticloadbalancing.ErrCodeTooManyAccessPointsException, aerr.Error())
			case elasticloadbalancing.ErrCodeCertificateNotFoundException:
				fmt.Println(elasticloadbalancing.ErrCodeCertificateNotFoundException, aerr.Error())
			case elasticloadbalancing.ErrCodeInvalidConfigurationRequestException:
				fmt.Println(elasticloadbalancing.ErrCodeInvalidConfigurationRequestException, aerr.Error())
			case elasticloadbalancing.ErrCodeSubnetNotFoundException:
				fmt.Println(elasticloadbalancing.ErrCodeSubnetNotFoundException, aerr.Error())
			case elasticloadbalancing.ErrCodeInvalidSubnetException:
				fmt.Println(elasticloadbalancing.ErrCodeInvalidSubnetException, aerr.Error())
			case elasticloadbalancing.ErrCodeInvalidSecurityGroupException:
				fmt.Println(elasticloadbalancing.ErrCodeInvalidSecurityGroupException, aerr.Error())
			case elasticloadbalancing.ErrCodeInvalidSchemeException:
				fmt.Println(elasticloadbalancing.ErrCodeInvalidSchemeException, aerr.Error())
			case elasticloadbalancing.ErrCodeTooManyTagsException:
				fmt.Println(elasticloadbalancing.ErrCodeTooManyTagsException, aerr.Error())
			case elasticloadbalancing.ErrCodeDuplicateTagKeysException:
				fmt.Println(elasticloadbalancing.ErrCodeDuplicateTagKeysException, aerr.Error())
			case elasticloadbalancing.ErrCodeUnsupportedProtocolException:
				fmt.Println(elasticloadbalancing.ErrCodeUnsupportedProtocolException, aerr.Error())
			case elasticloadbalancing.ErrCodeOperationNotPermittedException:
				fmt.Println(elasticloadbalancing.ErrCodeOperationNotPermittedException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

Example (Shared01)

To create an HTTP load balancer in EC2-Classic

This example creates a load balancer with an HTTP listener in EC2-Classic.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := elasticloadbalancing.New(cfg)
	input := &elasticloadbalancing.CreateLoadBalancerInput{
		AvailabilityZones: []string{
			"us-west-2a",
		},
		Listeners: []elasticloadbalancing.Listener{
			{
				InstancePort:     aws.Int64(80),
				InstanceProtocol: aws.String("HTTP"),
				LoadBalancerPort: aws.Int64(80),
				Protocol:         aws.String("HTTP"),
			},
		},
		LoadBalancerName: aws.String("my-load-balancer"),
	}

	req := svc.CreateLoadBalancerRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case elasticloadbalancing.ErrCodeDuplicateAccessPointNameException:
				fmt.Println(elasticloadbalancing.ErrCodeDuplicateAccessPointNameException, aerr.Error())
			case elasticloadbalancing.ErrCodeTooManyAccessPointsException:
				fmt.Println(elasticloadbalancing.ErrCodeTooManyAccessPointsException, aerr.Error())
			case elasticloadbalancing.ErrCodeCertificateNotFoundException:
				fmt.Println(elasticloadbalancing.ErrCodeCertificateNotFoundException, aerr.Error())
			case elasticloadbalancing.ErrCodeInvalidConfigurationRequestException:
				fmt.Println(elasticloadbalancing.ErrCodeInvalidConfigurationRequestException, aerr.Error())
			case elasticloadbalancing.ErrCodeSubnetNotFoundException:
				fmt.Println(elasticloadbalancing.ErrCodeSubnetNotFoundException, aerr.Error())
			case elasticloadbalancing.ErrCodeInvalidSubnetException:
				fmt.Println(elasticloadbalancing.ErrCodeInvalidSubnetException, aerr.Error())
			case elasticloadbalancing.ErrCodeInvalidSecurityGroupException:
				fmt.Println(elasticloadbalancing.ErrCodeInvalidSecurityGroupException, aerr.Error())
			case elasticloadbalancing.ErrCodeInvalidSchemeException:
				fmt.Println(elasticloadbalancing.ErrCodeInvalidSchemeException, aerr.Error())
			case elasticloadbalancing.ErrCodeTooManyTagsException:
				fmt.Println(elasticloadbalancing.ErrCodeTooManyTagsException, aerr.Error())
			case elasticloadbalancing.ErrCodeDuplicateTagKeysException:
				fmt.Println(elasticloadbalancing.ErrCodeDuplicateTagKeysException, aerr.Error())
			case elasticloadbalancing.ErrCodeUnsupportedProtocolException:
				fmt.Println(elasticloadbalancing.ErrCodeUnsupportedProtocolException, aerr.Error())
			case elasticloadbalancing.ErrCodeOperationNotPermittedException:
				fmt.Println(elasticloadbalancing.ErrCodeOperationNotPermittedException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

Example (Shared02)

To create an HTTPS load balancer in a VPC

This example creates a load balancer with an HTTPS listener in a VPC.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := elasticloadbalancing.New(cfg)
	input := &elasticloadbalancing.CreateLoadBalancerInput{
		Listeners: []elasticloadbalancing.Listener{
			{
				InstancePort:     aws.Int64(80),
				InstanceProtocol: aws.String("HTTP"),
				LoadBalancerPort: aws.Int64(80),
				Protocol:         aws.String("HTTP"),
			},
			{
				InstancePort:     aws.Int64(80),
				InstanceProtocol: aws.String("HTTP"),
				LoadBalancerPort: aws.Int64(443),
				Protocol:         aws.String("HTTPS"),
				SSLCertificateId: aws.String("arn:aws:iam::123456789012:server-certificate/my-server-cert"),
			},
		},
		LoadBalancerName: aws.String("my-load-balancer"),
		SecurityGroups: []string{
			"sg-a61988c3",
		},
		Subnets: []string{
			"subnet-15aaab61",
		},
	}

	req := svc.CreateLoadBalancerRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case elasticloadbalancing.ErrCodeDuplicateAccessPointNameException:
				fmt.Println(elasticloadbalancing.ErrCodeDuplicateAccessPointNameException, aerr.Error())
			case elasticloadbalancing.ErrCodeTooManyAccessPointsException:
				fmt.Println(elasticloadbalancing.ErrCodeTooManyAccessPointsException, aerr.Error())
			case elasticloadbalancing.ErrCodeCertificateNotFoundException:
				fmt.Println(elasticloadbalancing.ErrCodeCertificateNotFoundException, aerr.Error())
			case elasticloadbalancing.ErrCodeInvalidConfigurationRequestException:
				fmt.Println(elasticloadbalancing.ErrCodeInvalidConfigurationRequestException, aerr.Error())
			case elasticloadbalancing.ErrCodeSubnetNotFoundException:
				fmt.Println(elasticloadbalancing.ErrCodeSubnetNotFoundException, aerr.Error())
			case elasticloadbalancing.ErrCodeInvalidSubnetException:
				fmt.Println(elasticloadbalancing.ErrCodeInvalidSubnetException, aerr.Error())
			case elasticloadbalancing.ErrCodeInvalidSecurityGroupException:
				fmt.Println(elasticloadbalancing.ErrCodeInvalidSecurityGroupException, aerr.Error())
			case elasticloadbalancing.ErrCodeInvalidSchemeException:
				fmt.Println(elasticloadbalancing.ErrCodeInvalidSchemeException, aerr.Error())
			case elasticloadbalancing.ErrCodeTooManyTagsException:
				fmt.Println(elasticloadbalancing.ErrCodeTooManyTagsException, aerr.Error())
			case elasticloadbalancing.ErrCodeDuplicateTagKeysException:
				fmt.Println(elasticloadbalancing.ErrCodeDuplicateTagKeysException, aerr.Error())
			case elasticloadbalancing.ErrCodeUnsupportedProtocolException:
				fmt.Println(elasticloadbalancing.ErrCodeUnsupportedProtocolException, aerr.Error())
			case elasticloadbalancing.ErrCodeOperationNotPermittedException:
				fmt.Println(elasticloadbalancing.ErrCodeOperationNotPermittedException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

Example (Shared03)

To create an HTTPS load balancer in EC2-Classic

This example creates a load balancer with an HTTPS listener in EC2-Classic.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := elasticloadbalancing.New(cfg)
	input := &elasticloadbalancing.CreateLoadBalancerInput{
		AvailabilityZones: []string{
			"us-west-2a",
		},
		Listeners: []elasticloadbalancing.Listener{
			{
				InstancePort:     aws.Int64(80),
				InstanceProtocol: aws.String("HTTP"),
				LoadBalancerPort: aws.Int64(80),
				Protocol:         aws.String("HTTP"),
			},
			{
				InstancePort:     aws.Int64(80),
				InstanceProtocol: aws.String("HTTP"),
				LoadBalancerPort: aws.Int64(443),
				Protocol:         aws.String("HTTPS"),
				SSLCertificateId: aws.String("arn:aws:iam::123456789012:server-certificate/my-server-cert"),
			},
		},
		LoadBalancerName: aws.String("my-load-balancer"),
	}

	req := svc.CreateLoadBalancerRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case elasticloadbalancing.ErrCodeDuplicateAccessPointNameException:
				fmt.Println(elasticloadbalancing.ErrCodeDuplicateAccessPointNameException, aerr.Error())
			case elasticloadbalancing.ErrCodeTooManyAccessPointsException:
				fmt.Println(elasticloadbalancing.ErrCodeTooManyAccessPointsException, aerr.Error())
			case elasticloadbalancing.ErrCodeCertificateNotFoundException:
				fmt.Println(elasticloadbalancing.ErrCodeCertificateNotFoundException, aerr.Error())
			case elasticloadbalancing.ErrCodeInvalidConfigurationRequestException:
				fmt.Println(elasticloadbalancing.ErrCodeInvalidConfigurationRequestException, aerr.Error())
			case elasticloadbalancing.ErrCodeSubnetNotFoundException:
				fmt.Println(elasticloadbalancing.ErrCodeSubnetNotFoundException, aerr.Error())
			case elasticloadbalancing.ErrCodeInvalidSubnetException:
				fmt.Println(elasticloadbalancing.ErrCodeInvalidSubnetException, aerr.Error())
			case elasticloadbalancing.ErrCodeInvalidSecurityGroupException:
				fmt.Println(elasticloadbalancing.ErrCodeInvalidSecurityGroupException, aerr.Error())
			case elasticloadbalancing.ErrCodeInvalidSchemeException:
				fmt.Println(elasticloadbalancing.ErrCodeInvalidSchemeException, aerr.Error())
			case elasticloadbalancing.ErrCodeTooManyTagsException:
				fmt.Println(elasticloadbalancing.ErrCodeTooManyTagsException, aerr.Error())
			case elasticloadbalancing.ErrCodeDuplicateTagKeysException:
				fmt.Println(elasticloadbalancing.ErrCodeDuplicateTagKeysException, aerr.Error())
			case elasticloadbalancing.ErrCodeUnsupportedProtocolException:
				fmt.Println(elasticloadbalancing.ErrCodeUnsupportedProtocolException, aerr.Error())
			case elasticloadbalancing.ErrCodeOperationNotPermittedException:
				fmt.Println(elasticloadbalancing.ErrCodeOperationNotPermittedException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

Example (Shared04)

To create an internal load balancer

This example creates an internal load balancer with an HTTP listener in a VPC.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := elasticloadbalancing.New(cfg)
	input := &elasticloadbalancing.CreateLoadBalancerInput{
		Listeners: []elasticloadbalancing.Listener{
			{
				InstancePort:     aws.Int64(80),
				InstanceProtocol: aws.String("HTTP"),
				LoadBalancerPort: aws.Int64(80),
				Protocol:         aws.String("HTTP"),
			},
		},
		LoadBalancerName: aws.String("my-load-balancer"),
		Scheme:           aws.String("internal"),
		SecurityGroups: []string{
			"sg-a61988c3",
		},
		Subnets: []string{
			"subnet-15aaab61",
		},
	}

	req := svc.CreateLoadBalancerRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case elasticloadbalancing.ErrCodeDuplicateAccessPointNameException:
				fmt.Println(elasticloadbalancing.ErrCodeDuplicateAccessPointNameException, aerr.Error())
			case elasticloadbalancing.ErrCodeTooManyAccessPointsException:
				fmt.Println(elasticloadbalancing.ErrCodeTooManyAccessPointsException, aerr.Error())
			case elasticloadbalancing.ErrCodeCertificateNotFoundException:
				fmt.Println(elasticloadbalancing.ErrCodeCertificateNotFoundException, aerr.Error())
			case elasticloadbalancing.ErrCodeInvalidConfigurationRequestException:
				fmt.Println(elasticloadbalancing.ErrCodeInvalidConfigurationRequestException, aerr.Error())
			case elasticloadbalancing.ErrCodeSubnetNotFoundException:
				fmt.Println(elasticloadbalancing.ErrCodeSubnetNotFoundException, aerr.Error())
			case elasticloadbalancing.ErrCodeInvalidSubnetException:
				fmt.Println(elasticloadbalancing.ErrCodeInvalidSubnetException, aerr.Error())
			case elasticloadbalancing.ErrCodeInvalidSecurityGroupException:
				fmt.Println(elasticloadbalancing.ErrCodeInvalidSecurityGroupException, aerr.Error())
			case elasticloadbalancing.ErrCodeInvalidSchemeException:
				fmt.Println(elasticloadbalancing.ErrCodeInvalidSchemeException, aerr.Error())
			case elasticloadbalancing.ErrCodeTooManyTagsException:
				fmt.Println(elasticloadbalancing.ErrCodeTooManyTagsException, aerr.Error())
			case elasticloadbalancing.ErrCodeDuplicateTagKeysException:
				fmt.Println(elasticloadbalancing.ErrCodeDuplicateTagKeysException, aerr.Error())
			case elasticloadbalancing.ErrCodeUnsupportedProtocolException:
				fmt.Println(elasticloadbalancing.ErrCodeUnsupportedProtocolException, aerr.Error())
			case elasticloadbalancing.ErrCodeOperationNotPermittedException:
				fmt.Println(elasticloadbalancing.ErrCodeOperationNotPermittedException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*Client) DeleteLoadBalancerListenersRequest

func (c *Client) DeleteLoadBalancerListenersRequest(input *DeleteLoadBalancerListenersInput) DeleteLoadBalancerListenersRequest

DeleteLoadBalancerListenersRequest returns a request value for making API operation for Elastic Load Balancing.

Deletes the specified listeners from the specified load balancer.

// Example sending a request using DeleteLoadBalancerListenersRequest.
req := client.DeleteLoadBalancerListenersRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/DeleteLoadBalancerListeners

Example (Shared00)

To delete a listener from your load balancer

This example deletes the listener for the specified port from the specified load balancer.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := elasticloadbalancing.New(cfg)
	input := &elasticloadbalancing.DeleteLoadBalancerListenersInput{
		LoadBalancerName: aws.String("my-load-balancer"),
		LoadBalancerPorts: []int64{
			80,
		},
	}

	req := svc.DeleteLoadBalancerListenersRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case elasticloadbalancing.ErrCodeAccessPointNotFoundException:
				fmt.Println(elasticloadbalancing.ErrCodeAccessPointNotFoundException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*Client) DeleteLoadBalancerPolicyRequest

func (c *Client) DeleteLoadBalancerPolicyRequest(input *DeleteLoadBalancerPolicyInput) DeleteLoadBalancerPolicyRequest

DeleteLoadBalancerPolicyRequest returns a request value for making API operation for Elastic Load Balancing.

Deletes the specified policy from the specified load balancer. This policy must not be enabled for any listeners.

// Example sending a request using DeleteLoadBalancerPolicyRequest.
req := client.DeleteLoadBalancerPolicyRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/DeleteLoadBalancerPolicy

Example (Shared00)

To delete a policy from your load balancer

This example deletes the specified policy from the specified load balancer. The policy must not be enabled on any listener.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := elasticloadbalancing.New(cfg)
	input := &elasticloadbalancing.DeleteLoadBalancerPolicyInput{
		LoadBalancerName: aws.String("my-load-balancer"),
		PolicyName:       aws.String("my-duration-cookie-policy"),
	}

	req := svc.DeleteLoadBalancerPolicyRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case elasticloadbalancing.ErrCodeAccessPointNotFoundException:
				fmt.Println(elasticloadbalancing.ErrCodeAccessPointNotFoundException, aerr.Error())
			case elasticloadbalancing.ErrCodeInvalidConfigurationRequestException:
				fmt.Println(elasticloadbalancing.ErrCodeInvalidConfigurationRequestException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*Client) DeleteLoadBalancerRequest

func (c *Client) DeleteLoadBalancerRequest(input *DeleteLoadBalancerInput) DeleteLoadBalancerRequest

DeleteLoadBalancerRequest returns a request value for making API operation for Elastic Load Balancing.

Deletes the specified load balancer.

If you are attempting to recreate a load balancer, you must reconfigure all settings. The DNS name associated with a deleted load balancer are no longer usable. The name and associated DNS record of the deleted load balancer no longer exist and traffic sent to any of its IP addresses is no longer delivered to your instances.

If the load balancer does not exist or has already been deleted, the call to DeleteLoadBalancer still succeeds.

// Example sending a request using DeleteLoadBalancerRequest.
req := client.DeleteLoadBalancerRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/DeleteLoadBalancer

Example (Shared00)

To delete a load balancer

This example deletes the specified load balancer.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := elasticloadbalancing.New(cfg)
	input := &elasticloadbalancing.DeleteLoadBalancerInput{
		LoadBalancerName: aws.String("my-load-balancer"),
	}

	req := svc.DeleteLoadBalancerRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*Client) DeregisterInstancesFromLoadBalancerRequest

func (c *Client) DeregisterInstancesFromLoadBalancerRequest(input *DeregisterInstancesFromLoadBalancerInput) DeregisterInstancesFromLoadBalancerRequest

DeregisterInstancesFromLoadBalancerRequest returns a request value for making API operation for Elastic Load Balancing.

Deregisters the specified instances from the specified load balancer. After the instance is deregistered, it no longer receives traffic from the load balancer.

You can use DescribeLoadBalancers to verify that the instance is deregistered from the load balancer.

For more information, see Register or De-Register EC2 Instances (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-deregister-register-instances.html) in the Classic Load Balancers Guide.

// Example sending a request using DeregisterInstancesFromLoadBalancerRequest.
req := client.DeregisterInstancesFromLoadBalancerRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/DeregisterInstancesFromLoadBalancer

Example (Shared00)

To deregister instances from a load balancer

This example deregisters the specified instance from the specified load balancer.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := elasticloadbalancing.New(cfg)
	input := &elasticloadbalancing.DeregisterInstancesFromLoadBalancerInput{
		Instances: []elasticloadbalancing.Instance{
			{
				InstanceId: aws.String("i-d6f6fae3"),
			},
		},
		LoadBalancerName: aws.String("my-load-balancer"),
	}

	req := svc.DeregisterInstancesFromLoadBalancerRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case elasticloadbalancing.ErrCodeAccessPointNotFoundException:
				fmt.Println(elasticloadbalancing.ErrCodeAccessPointNotFoundException, aerr.Error())
			case elasticloadbalancing.ErrCodeInvalidEndPointException:
				fmt.Println(elasticloadbalancing.ErrCodeInvalidEndPointException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*Client) DescribeAccountLimitsRequest

func (c *Client) DescribeAccountLimitsRequest(input *DescribeAccountLimitsInput) DescribeAccountLimitsRequest

DescribeAccountLimitsRequest returns a request value for making API operation for Elastic Load Balancing.

Describes the current Elastic Load Balancing resource limits for your AWS account.

For more information, see Limits for Your Classic Load Balancer (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-limits.html) in the Classic Load Balancers Guide.

// Example sending a request using DescribeAccountLimitsRequest.
req := client.DescribeAccountLimitsRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/DescribeAccountLimits

func (*Client) DescribeInstanceHealthRequest

func (c *Client) DescribeInstanceHealthRequest(input *DescribeInstanceHealthInput) DescribeInstanceHealthRequest

DescribeInstanceHealthRequest returns a request value for making API operation for Elastic Load Balancing.

Describes the state of the specified instances with respect to the specified load balancer. If no instances are specified, the call describes the state of all instances that are currently registered with the load balancer. If instances are specified, their state is returned even if they are no longer registered with the load balancer. The state of terminated instances is not returned.

// Example sending a request using DescribeInstanceHealthRequest.
req := client.DescribeInstanceHealthRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/DescribeInstanceHealth

Example (Shared00)

To describe the health of the instances for a load balancer

This example describes the health of the instances for the specified load balancer.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := elasticloadbalancing.New(cfg)
	input := &elasticloadbalancing.DescribeInstanceHealthInput{
		LoadBalancerName: aws.String("my-load-balancer"),
	}

	req := svc.DescribeInstanceHealthRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case elasticloadbalancing.ErrCodeAccessPointNotFoundException:
				fmt.Println(elasticloadbalancing.ErrCodeAccessPointNotFoundException, aerr.Error())
			case elasticloadbalancing.ErrCodeInvalidEndPointException:
				fmt.Println(elasticloadbalancing.ErrCodeInvalidEndPointException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*Client) DescribeLoadBalancerAttributesRequest

func (c *Client) DescribeLoadBalancerAttributesRequest(input *DescribeLoadBalancerAttributesInput) DescribeLoadBalancerAttributesRequest

DescribeLoadBalancerAttributesRequest returns a request value for making API operation for Elastic Load Balancing.

Describes the attributes for the specified load balancer.

// Example sending a request using DescribeLoadBalancerAttributesRequest.
req := client.DescribeLoadBalancerAttributesRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/DescribeLoadBalancerAttributes

Example (Shared00)

To describe the attributes of a load balancer

This example describes the attributes of the specified load balancer.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := elasticloadbalancing.New(cfg)
	input := &elasticloadbalancing.DescribeLoadBalancerAttributesInput{
		LoadBalancerName: aws.String("my-load-balancer"),
	}

	req := svc.DescribeLoadBalancerAttributesRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case elasticloadbalancing.ErrCodeAccessPointNotFoundException:
				fmt.Println(elasticloadbalancing.ErrCodeAccessPointNotFoundException, aerr.Error())
			case elasticloadbalancing.ErrCodeLoadBalancerAttributeNotFoundException:
				fmt.Println(elasticloadbalancing.ErrCodeLoadBalancerAttributeNotFoundException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*Client) DescribeLoadBalancerPoliciesRequest

func (c *Client) DescribeLoadBalancerPoliciesRequest(input *DescribeLoadBalancerPoliciesInput) DescribeLoadBalancerPoliciesRequest

DescribeLoadBalancerPoliciesRequest returns a request value for making API operation for Elastic Load Balancing.

Describes the specified policies.

If you specify a load balancer name, the action returns the descriptions of all policies created for the load balancer. If you specify a policy name associated with your load balancer, the action returns the description of that policy. If you don't specify a load balancer name, the action returns descriptions of the specified sample policies, or descriptions of all sample policies. The names of the sample policies have the ELBSample- prefix.

// Example sending a request using DescribeLoadBalancerPoliciesRequest.
req := client.DescribeLoadBalancerPoliciesRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/DescribeLoadBalancerPolicies

Example (Shared00)

To describe a policy associated with a load balancer

This example describes the specified policy associated with the specified load balancer.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := elasticloadbalancing.New(cfg)
	input := &elasticloadbalancing.DescribeLoadBalancerPoliciesInput{
		LoadBalancerName: aws.String("my-load-balancer"),
		PolicyNames: []string{
			"my-authentication-policy",
		},
	}

	req := svc.DescribeLoadBalancerPoliciesRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case elasticloadbalancing.ErrCodeAccessPointNotFoundException:
				fmt.Println(elasticloadbalancing.ErrCodeAccessPointNotFoundException, aerr.Error())
			case elasticloadbalancing.ErrCodePolicyNotFoundException:
				fmt.Println(elasticloadbalancing.ErrCodePolicyNotFoundException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*Client) DescribeLoadBalancerPolicyTypesRequest

func (c *Client) DescribeLoadBalancerPolicyTypesRequest(input *DescribeLoadBalancerPolicyTypesInput) DescribeLoadBalancerPolicyTypesRequest

DescribeLoadBalancerPolicyTypesRequest returns a request value for making API operation for Elastic Load Balancing.

Describes the specified load balancer policy types or all load balancer policy types.

The description of each type indicates how it can be used. For example, some policies can be used only with layer 7 listeners, some policies can be used only with layer 4 listeners, and some policies can be used only with your EC2 instances.

You can use CreateLoadBalancerPolicy to create a policy configuration for any of these policy types. Then, depending on the policy type, use either SetLoadBalancerPoliciesOfListener or SetLoadBalancerPoliciesForBackendServer to set the policy.

// Example sending a request using DescribeLoadBalancerPolicyTypesRequest.
req := client.DescribeLoadBalancerPolicyTypesRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/DescribeLoadBalancerPolicyTypes

Example (Shared00)

To describe a load balancer policy type defined by Elastic Load Balancing

This example describes the specified load balancer policy type.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := elasticloadbalancing.New(cfg)
	input := &elasticloadbalancing.DescribeLoadBalancerPolicyTypesInput{
		PolicyTypeNames: []string{
			"ProxyProtocolPolicyType",
		},
	}

	req := svc.DescribeLoadBalancerPolicyTypesRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case elasticloadbalancing.ErrCodePolicyTypeNotFoundException:
				fmt.Println(elasticloadbalancing.ErrCodePolicyTypeNotFoundException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*Client) DescribeLoadBalancersRequest

func (c *Client) DescribeLoadBalancersRequest(input *DescribeLoadBalancersInput) DescribeLoadBalancersRequest

DescribeLoadBalancersRequest returns a request value for making API operation for Elastic Load Balancing.

Describes the specified the load balancers. If no load balancers are specified, the call describes all of your load balancers.

// Example sending a request using DescribeLoadBalancersRequest.
req := client.DescribeLoadBalancersRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/DescribeLoadBalancers

Example (Shared00)

To describe one of your load balancers

This example describes the specified load balancer.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := elasticloadbalancing.New(cfg)
	input := &elasticloadbalancing.DescribeLoadBalancersInput{
		LoadBalancerNames: []string{
			"my-load-balancer",
		},
	}

	req := svc.DescribeLoadBalancersRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case elasticloadbalancing.ErrCodeAccessPointNotFoundException:
				fmt.Println(elasticloadbalancing.ErrCodeAccessPointNotFoundException, aerr.Error())
			case elasticloadbalancing.ErrCodeDependencyThrottleException:
				fmt.Println(elasticloadbalancing.ErrCodeDependencyThrottleException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*Client) DescribeTagsRequest

func (c *Client) DescribeTagsRequest(input *DescribeTagsInput) DescribeTagsRequest

DescribeTagsRequest returns a request value for making API operation for Elastic Load Balancing.

Describes the tags associated with the specified load balancers.

// Example sending a request using DescribeTagsRequest.
req := client.DescribeTagsRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/DescribeTags

Example (Shared00)

To describe the tags for a load balancer

This example describes the tags for the specified load balancer.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := elasticloadbalancing.New(cfg)
	input := &elasticloadbalancing.DescribeTagsInput{
		LoadBalancerNames: []string{
			"my-load-balancer",
		},
	}

	req := svc.DescribeTagsRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case elasticloadbalancing.ErrCodeAccessPointNotFoundException:
				fmt.Println(elasticloadbalancing.ErrCodeAccessPointNotFoundException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*Client) DetachLoadBalancerFromSubnetsRequest

func (c *Client) DetachLoadBalancerFromSubnetsRequest(input *DetachLoadBalancerFromSubnetsInput) DetachLoadBalancerFromSubnetsRequest

DetachLoadBalancerFromSubnetsRequest returns a request value for making API operation for Elastic Load Balancing.

Removes the specified subnets from the set of configured subnets for the load balancer.

After a subnet is removed, all EC2 instances registered with the load balancer in the removed subnet go into the OutOfService state. Then, the load balancer balances the traffic among the remaining routable subnets.

// Example sending a request using DetachLoadBalancerFromSubnetsRequest.
req := client.DetachLoadBalancerFromSubnetsRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/DetachLoadBalancerFromSubnets

Example (Shared00)

To detach a load balancer from a subnet

This example detaches the specified load balancer from the specified subnet.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := elasticloadbalancing.New(cfg)
	input := &elasticloadbalancing.DetachLoadBalancerFromSubnetsInput{
		LoadBalancerName: aws.String("my-load-balancer"),
		Subnets: []string{
			"subnet-0ecac448",
		},
	}

	req := svc.DetachLoadBalancerFromSubnetsRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case elasticloadbalancing.ErrCodeAccessPointNotFoundException:
				fmt.Println(elasticloadbalancing.ErrCodeAccessPointNotFoundException, aerr.Error())
			case elasticloadbalancing.ErrCodeInvalidConfigurationRequestException:
				fmt.Println(elasticloadbalancing.ErrCodeInvalidConfigurationRequestException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*Client) DisableAvailabilityZonesForLoadBalancerRequest

func (c *Client) DisableAvailabilityZonesForLoadBalancerRequest(input *DisableAvailabilityZonesForLoadBalancerInput) DisableAvailabilityZonesForLoadBalancerRequest

DisableAvailabilityZonesForLoadBalancerRequest returns a request value for making API operation for Elastic Load Balancing.

Removes the specified Availability Zones from the set of Availability Zones for the specified load balancer in EC2-Classic or a default VPC.

For load balancers in a non-default VPC, use DetachLoadBalancerFromSubnets.

There must be at least one Availability Zone registered with a load balancer at all times. After an Availability Zone is removed, all instances registered with the load balancer that are in the removed Availability Zone go into the OutOfService state. Then, the load balancer attempts to equally balance the traffic among its remaining Availability Zones.

For more information, see Add or Remove Availability Zones (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/enable-disable-az.html) in the Classic Load Balancers Guide.

// Example sending a request using DisableAvailabilityZonesForLoadBalancerRequest.
req := client.DisableAvailabilityZonesForLoadBalancerRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/DisableAvailabilityZonesForLoadBalancer

Example (Shared00)

To disable an Availability Zone for a load balancer

This example removes the specified Availability Zone from the set of Availability Zones for the specified load balancer.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := elasticloadbalancing.New(cfg)
	input := &elasticloadbalancing.DisableAvailabilityZonesForLoadBalancerInput{
		AvailabilityZones: []string{
			"us-west-2a",
		},
		LoadBalancerName: aws.String("my-load-balancer"),
	}

	req := svc.DisableAvailabilityZonesForLoadBalancerRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case elasticloadbalancing.ErrCodeAccessPointNotFoundException:
				fmt.Println(elasticloadbalancing.ErrCodeAccessPointNotFoundException, aerr.Error())
			case elasticloadbalancing.ErrCodeInvalidConfigurationRequestException:
				fmt.Println(elasticloadbalancing.ErrCodeInvalidConfigurationRequestException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*Client) EnableAvailabilityZonesForLoadBalancerRequest

func (c *Client) EnableAvailabilityZonesForLoadBalancerRequest(input *EnableAvailabilityZonesForLoadBalancerInput) EnableAvailabilityZonesForLoadBalancerRequest

EnableAvailabilityZonesForLoadBalancerRequest returns a request value for making API operation for Elastic Load Balancing.

Adds the specified Availability Zones to the set of Availability Zones for the specified load balancer in EC2-Classic or a default VPC.

For load balancers in a non-default VPC, use AttachLoadBalancerToSubnets.

The load balancer evenly distributes requests across all its registered Availability Zones that contain instances. For more information, see Add or Remove Availability Zones (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/enable-disable-az.html) in the Classic Load Balancers Guide.

// Example sending a request using EnableAvailabilityZonesForLoadBalancerRequest.
req := client.EnableAvailabilityZonesForLoadBalancerRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/EnableAvailabilityZonesForLoadBalancer

Example (Shared00)

To enable an Availability Zone for a load balancer

This example adds the specified Availability Zone to the specified load balancer.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := elasticloadbalancing.New(cfg)
	input := &elasticloadbalancing.EnableAvailabilityZonesForLoadBalancerInput{
		AvailabilityZones: []string{
			"us-west-2b",
		},
		LoadBalancerName: aws.String("my-load-balancer"),
	}

	req := svc.EnableAvailabilityZonesForLoadBalancerRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case elasticloadbalancing.ErrCodeAccessPointNotFoundException:
				fmt.Println(elasticloadbalancing.ErrCodeAccessPointNotFoundException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*Client) ModifyLoadBalancerAttributesRequest

func (c *Client) ModifyLoadBalancerAttributesRequest(input *ModifyLoadBalancerAttributesInput) ModifyLoadBalancerAttributesRequest

ModifyLoadBalancerAttributesRequest returns a request value for making API operation for Elastic Load Balancing.

Modifies the attributes of the specified load balancer.

You can modify the load balancer attributes, such as AccessLogs, ConnectionDraining, and CrossZoneLoadBalancing by either enabling or disabling them. Or, you can modify the load balancer attribute ConnectionSettings by specifying an idle connection timeout value for your load balancer.

For more information, see the following in the Classic Load Balancers Guide:

Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/ModifyLoadBalancerAttributes

Example (Shared00)

To enable cross-zone load balancing

This example enables cross-zone load balancing for the specified load balancer.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := elasticloadbalancing.New(cfg)
	input := &elasticloadbalancing.ModifyLoadBalancerAttributesInput{
		LoadBalancerAttributes: &elasticloadbalancing.LoadBalancerAttributes{
			CrossZoneLoadBalancing: &elasticloadbalancing.CrossZoneLoadBalancing{
				Enabled: aws.Bool(true),
			},
		},
		LoadBalancerName: aws.String("my-load-balancer"),
	}

	req := svc.ModifyLoadBalancerAttributesRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case elasticloadbalancing.ErrCodeAccessPointNotFoundException:
				fmt.Println(elasticloadbalancing.ErrCodeAccessPointNotFoundException, aerr.Error())
			case elasticloadbalancing.ErrCodeLoadBalancerAttributeNotFoundException:
				fmt.Println(elasticloadbalancing.ErrCodeLoadBalancerAttributeNotFoundException, aerr.Error())
			case elasticloadbalancing.ErrCodeInvalidConfigurationRequestException:
				fmt.Println(elasticloadbalancing.ErrCodeInvalidConfigurationRequestException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

Example (Shared01)

To enable connection draining

This example enables connection draining for the specified load balancer.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := elasticloadbalancing.New(cfg)
	input := &elasticloadbalancing.ModifyLoadBalancerAttributesInput{
		LoadBalancerAttributes: &elasticloadbalancing.LoadBalancerAttributes{
			ConnectionDraining: &elasticloadbalancing.ConnectionDraining{
				Enabled: aws.Bool(true),
				Timeout: aws.Int64(300),
			},
		},
		LoadBalancerName: aws.String("my-load-balancer"),
	}

	req := svc.ModifyLoadBalancerAttributesRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case elasticloadbalancing.ErrCodeAccessPointNotFoundException:
				fmt.Println(elasticloadbalancing.ErrCodeAccessPointNotFoundException, aerr.Error())
			case elasticloadbalancing.ErrCodeLoadBalancerAttributeNotFoundException:
				fmt.Println(elasticloadbalancing.ErrCodeLoadBalancerAttributeNotFoundException, aerr.Error())
			case elasticloadbalancing.ErrCodeInvalidConfigurationRequestException:
				fmt.Println(elasticloadbalancing.ErrCodeInvalidConfigurationRequestException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*Client) RegisterInstancesWithLoadBalancerRequest

func (c *Client) RegisterInstancesWithLoadBalancerRequest(input *RegisterInstancesWithLoadBalancerInput) RegisterInstancesWithLoadBalancerRequest

RegisterInstancesWithLoadBalancerRequest returns a request value for making API operation for Elastic Load Balancing.

Adds the specified instances to the specified load balancer.

The instance must be a running instance in the same network as the load balancer (EC2-Classic or the same VPC). If you have EC2-Classic instances and a load balancer in a VPC with ClassicLink enabled, you can link the EC2-Classic instances to that VPC and then register the linked EC2-Classic instances with the load balancer in the VPC.

Note that RegisterInstanceWithLoadBalancer completes when the request has been registered. Instance registration takes a little time to complete. To check the state of the registered instances, use DescribeLoadBalancers or DescribeInstanceHealth.

After the instance is registered, it starts receiving traffic and requests from the load balancer. Any instance that is not in one of the Availability Zones registered for the load balancer is moved to the OutOfService state. If an Availability Zone is added to the load balancer later, any instances registered with the load balancer move to the InService state.

To deregister instances from a load balancer, use DeregisterInstancesFromLoadBalancer.

For more information, see Register or De-Register EC2 Instances (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-deregister-register-instances.html) in the Classic Load Balancers Guide.

// Example sending a request using RegisterInstancesWithLoadBalancerRequest.
req := client.RegisterInstancesWithLoadBalancerRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/RegisterInstancesWithLoadBalancer

Example (Shared00)

To register instances with a load balancer

This example registers the specified instance with the specified load balancer.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := elasticloadbalancing.New(cfg)
	input := &elasticloadbalancing.RegisterInstancesWithLoadBalancerInput{
		Instances: []elasticloadbalancing.Instance{
			{
				InstanceId: aws.String("i-d6f6fae3"),
			},
		},
		LoadBalancerName: aws.String("my-load-balancer"),
	}

	req := svc.RegisterInstancesWithLoadBalancerRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case elasticloadbalancing.ErrCodeAccessPointNotFoundException:
				fmt.Println(elasticloadbalancing.ErrCodeAccessPointNotFoundException, aerr.Error())
			case elasticloadbalancing.ErrCodeInvalidEndPointException:
				fmt.Println(elasticloadbalancing.ErrCodeInvalidEndPointException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*Client) RemoveTagsRequest

func (c *Client) RemoveTagsRequest(input *RemoveTagsInput) RemoveTagsRequest

RemoveTagsRequest returns a request value for making API operation for Elastic Load Balancing.

Removes one or more tags from the specified load balancer.

// Example sending a request using RemoveTagsRequest.
req := client.RemoveTagsRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/RemoveTags

Example (Shared00)

To remove tags from a load balancer

This example removes the specified tag from the specified load balancer.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := elasticloadbalancing.New(cfg)
	input := &elasticloadbalancing.RemoveTagsInput{
		LoadBalancerNames: []string{
			"my-load-balancer",
		},
		Tags: []elasticloadbalancing.TagKeyOnly{
			{
				Key: aws.String("project"),
			},
		},
	}

	req := svc.RemoveTagsRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case elasticloadbalancing.ErrCodeAccessPointNotFoundException:
				fmt.Println(elasticloadbalancing.ErrCodeAccessPointNotFoundException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*Client) SetLoadBalancerListenerSSLCertificateRequest

func (c *Client) SetLoadBalancerListenerSSLCertificateRequest(input *SetLoadBalancerListenerSSLCertificateInput) SetLoadBalancerListenerSSLCertificateRequest

SetLoadBalancerListenerSSLCertificateRequest returns a request value for making API operation for Elastic Load Balancing.

Sets the certificate that terminates the specified listener's SSL connections. The specified certificate replaces any prior certificate that was used on the same load balancer and port.

For more information about updating your SSL certificate, see Replace the SSL Certificate for Your Load Balancer (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-update-ssl-cert.html) in the Classic Load Balancers Guide.

// Example sending a request using SetLoadBalancerListenerSSLCertificateRequest.
req := client.SetLoadBalancerListenerSSLCertificateRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/SetLoadBalancerListenerSSLCertificate

Example (Shared00)

To update the SSL certificate for an HTTPS listener

This example replaces the existing SSL certificate for the specified HTTPS listener.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := elasticloadbalancing.New(cfg)
	input := &elasticloadbalancing.SetLoadBalancerListenerSSLCertificateInput{
		LoadBalancerName: aws.String("my-load-balancer"),
		LoadBalancerPort: aws.Int64(443),
		SSLCertificateId: aws.String("arn:aws:iam::123456789012:server-certificate/new-server-cert"),
	}

	req := svc.SetLoadBalancerListenerSSLCertificateRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case elasticloadbalancing.ErrCodeCertificateNotFoundException:
				fmt.Println(elasticloadbalancing.ErrCodeCertificateNotFoundException, aerr.Error())
			case elasticloadbalancing.ErrCodeAccessPointNotFoundException:
				fmt.Println(elasticloadbalancing.ErrCodeAccessPointNotFoundException, aerr.Error())
			case elasticloadbalancing.ErrCodeListenerNotFoundException:
				fmt.Println(elasticloadbalancing.ErrCodeListenerNotFoundException, aerr.Error())
			case elasticloadbalancing.ErrCodeInvalidConfigurationRequestException:
				fmt.Println(elasticloadbalancing.ErrCodeInvalidConfigurationRequestException, aerr.Error())
			case elasticloadbalancing.ErrCodeUnsupportedProtocolException:
				fmt.Println(elasticloadbalancing.ErrCodeUnsupportedProtocolException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*Client) SetLoadBalancerPoliciesForBackendServerRequest

func (c *Client) SetLoadBalancerPoliciesForBackendServerRequest(input *SetLoadBalancerPoliciesForBackendServerInput) SetLoadBalancerPoliciesForBackendServerRequest

SetLoadBalancerPoliciesForBackendServerRequest returns a request value for making API operation for Elastic Load Balancing.

Replaces the set of policies associated with the specified port on which the EC2 instance is listening with a new set of policies. At this time, only the back-end server authentication policy type can be applied to the instance ports; this policy type is composed of multiple public key policies.

Each time you use SetLoadBalancerPoliciesForBackendServer to enable the policies, use the PolicyNames parameter to list the policies that you want to enable.

You can use DescribeLoadBalancers or DescribeLoadBalancerPolicies to verify that the policy is associated with the EC2 instance.

For more information about enabling back-end instance authentication, see Configure Back-end Instance Authentication (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-create-https-ssl-load-balancer.html#configure_backendauth_clt) in the Classic Load Balancers Guide. For more information about Proxy Protocol, see Configure Proxy Protocol Support (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/enable-proxy-protocol.html) in the Classic Load Balancers Guide.

// Example sending a request using SetLoadBalancerPoliciesForBackendServerRequest.
req := client.SetLoadBalancerPoliciesForBackendServerRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/SetLoadBalancerPoliciesForBackendServer

Example (Shared00)

To replace the policies associated with a port for a backend instance

This example replaces the policies that are currently associated with the specified port.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := elasticloadbalancing.New(cfg)
	input := &elasticloadbalancing.SetLoadBalancerPoliciesForBackendServerInput{
		InstancePort:     aws.Int64(80),
		LoadBalancerName: aws.String("my-load-balancer"),
		PolicyNames: []string{
			"my-ProxyProtocol-policy",
		},
	}

	req := svc.SetLoadBalancerPoliciesForBackendServerRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case elasticloadbalancing.ErrCodeAccessPointNotFoundException:
				fmt.Println(elasticloadbalancing.ErrCodeAccessPointNotFoundException, aerr.Error())
			case elasticloadbalancing.ErrCodePolicyNotFoundException:
				fmt.Println(elasticloadbalancing.ErrCodePolicyNotFoundException, aerr.Error())
			case elasticloadbalancing.ErrCodeInvalidConfigurationRequestException:
				fmt.Println(elasticloadbalancing.ErrCodeInvalidConfigurationRequestException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*Client) SetLoadBalancerPoliciesOfListenerRequest

func (c *Client) SetLoadBalancerPoliciesOfListenerRequest(input *SetLoadBalancerPoliciesOfListenerInput) SetLoadBalancerPoliciesOfListenerRequest

SetLoadBalancerPoliciesOfListenerRequest returns a request value for making API operation for Elastic Load Balancing.

Replaces the current set of policies for the specified load balancer port with the specified set of policies.

To enable back-end server authentication, use SetLoadBalancerPoliciesForBackendServer.

For more information about setting policies, see Update the SSL Negotiation Configuration (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/ssl-config-update.html), Duration-Based Session Stickiness (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-sticky-sessions.html#enable-sticky-sessions-duration), and Application-Controlled Session Stickiness (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-sticky-sessions.html#enable-sticky-sessions-application) in the Classic Load Balancers Guide.

// Example sending a request using SetLoadBalancerPoliciesOfListenerRequest.
req := client.SetLoadBalancerPoliciesOfListenerRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/SetLoadBalancerPoliciesOfListener

Example (Shared00)

To replace the policies associated with a listener

This example replaces the policies that are currently associated with the specified listener.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := elasticloadbalancing.New(cfg)
	input := &elasticloadbalancing.SetLoadBalancerPoliciesOfListenerInput{
		LoadBalancerName: aws.String("my-load-balancer"),
		LoadBalancerPort: aws.Int64(80),
		PolicyNames: []string{
			"my-SSLNegotiation-policy",
		},
	}

	req := svc.SetLoadBalancerPoliciesOfListenerRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case elasticloadbalancing.ErrCodeAccessPointNotFoundException:
				fmt.Println(elasticloadbalancing.ErrCodeAccessPointNotFoundException, aerr.Error())
			case elasticloadbalancing.ErrCodePolicyNotFoundException:
				fmt.Println(elasticloadbalancing.ErrCodePolicyNotFoundException, aerr.Error())
			case elasticloadbalancing.ErrCodeListenerNotFoundException:
				fmt.Println(elasticloadbalancing.ErrCodeListenerNotFoundException, aerr.Error())
			case elasticloadbalancing.ErrCodeInvalidConfigurationRequestException:
				fmt.Println(elasticloadbalancing.ErrCodeInvalidConfigurationRequestException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*Client) WaitUntilAnyInstanceInService

func (c *Client) WaitUntilAnyInstanceInService(ctx context.Context, input *DescribeInstanceHealthInput, opts ...aws.WaiterOption) error

WaitUntilAnyInstanceInService uses the Elastic Load Balancing API operation DescribeInstanceHealth to wait for a condition to be met before returning. If the condition is not met within the max attempt window, an error will be returned.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

func (*Client) WaitUntilInstanceDeregistered

func (c *Client) WaitUntilInstanceDeregistered(ctx context.Context, input *DescribeInstanceHealthInput, opts ...aws.WaiterOption) error

WaitUntilInstanceDeregistered uses the Elastic Load Balancing API operation DescribeInstanceHealth to wait for a condition to be met before returning. If the condition is not met within the max attempt window, an error will be returned.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

func (*Client) WaitUntilInstanceInService

func (c *Client) WaitUntilInstanceInService(ctx context.Context, input *DescribeInstanceHealthInput, opts ...aws.WaiterOption) error

WaitUntilInstanceInService uses the Elastic Load Balancing API operation DescribeInstanceHealth to wait for a condition to be met before returning. If the condition is not met within the max attempt window, an error will be returned.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

type ConfigureHealthCheckInput

type ConfigureHealthCheckInput struct {

	// The configuration information.
	//
	// HealthCheck is a required field
	HealthCheck *HealthCheck `type:"structure" required:"true"`

	// The name of the load balancer.
	//
	// LoadBalancerName is a required field
	LoadBalancerName *string `type:"string" required:"true"`
	// contains filtered or unexported fields
}

Contains the parameters for ConfigureHealthCheck.

func (ConfigureHealthCheckInput) String

func (s ConfigureHealthCheckInput) String() string

String returns the string representation

func (*ConfigureHealthCheckInput) Validate

func (s *ConfigureHealthCheckInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type ConfigureHealthCheckOutput

type ConfigureHealthCheckOutput struct {

	// The updated health check.
	HealthCheck *HealthCheck `type:"structure"`
	// contains filtered or unexported fields
}

Contains the output of ConfigureHealthCheck.

func (ConfigureHealthCheckOutput) String

String returns the string representation

type ConfigureHealthCheckRequest

type ConfigureHealthCheckRequest struct {
	*aws.Request
	Input *ConfigureHealthCheckInput
	Copy  func(*ConfigureHealthCheckInput) ConfigureHealthCheckRequest
}

ConfigureHealthCheckRequest is the request type for the ConfigureHealthCheck API operation.

func (ConfigureHealthCheckRequest) Send

Send marshals and sends the ConfigureHealthCheck API request.

type ConfigureHealthCheckResponse

type ConfigureHealthCheckResponse struct {
	*ConfigureHealthCheckOutput
	// contains filtered or unexported fields
}

ConfigureHealthCheckResponse is the response type for the ConfigureHealthCheck API operation.

func (*ConfigureHealthCheckResponse) SDKResponseMetdata

func (r *ConfigureHealthCheckResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the ConfigureHealthCheck request.

type ConnectionDraining

type ConnectionDraining struct {

	// Specifies whether connection draining is enabled for the load balancer.
	//
	// Enabled is a required field
	Enabled *bool `type:"boolean" required:"true"`

	// The maximum time, in seconds, to keep the existing connections open before
	// deregistering the instances.
	Timeout *int64 `type:"integer"`
	// contains filtered or unexported fields
}

Information about the ConnectionDraining attribute.

func (ConnectionDraining) String

func (s ConnectionDraining) String() string

String returns the string representation

func (*ConnectionDraining) Validate

func (s *ConnectionDraining) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type ConnectionSettings

type ConnectionSettings struct {

	// The time, in seconds, that the connection is allowed to be idle (no data
	// has been sent over the connection) before it is closed by the load balancer.
	//
	// IdleTimeout is a required field
	IdleTimeout *int64 `min:"1" type:"integer" required:"true"`
	// contains filtered or unexported fields
}

Information about the ConnectionSettings attribute.

func (ConnectionSettings) String

func (s ConnectionSettings) String() string

String returns the string representation

func (*ConnectionSettings) Validate

func (s *ConnectionSettings) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type CreateAppCookieStickinessPolicyInput

type CreateAppCookieStickinessPolicyInput struct {

	// The name of the application cookie used for stickiness.
	//
	// CookieName is a required field
	CookieName *string `type:"string" required:"true"`

	// The name of the load balancer.
	//
	// LoadBalancerName is a required field
	LoadBalancerName *string `type:"string" required:"true"`

	// The name of the policy being created. Policy names must consist of alphanumeric
	// characters and dashes (-). This name must be unique within the set of policies
	// for this load balancer.
	//
	// PolicyName is a required field
	PolicyName *string `type:"string" required:"true"`
	// contains filtered or unexported fields
}

Contains the parameters for CreateAppCookieStickinessPolicy.

func (CreateAppCookieStickinessPolicyInput) String

String returns the string representation

func (*CreateAppCookieStickinessPolicyInput) Validate

Validate inspects the fields of the type to determine if they are valid.

type CreateAppCookieStickinessPolicyOutput

type CreateAppCookieStickinessPolicyOutput struct {
	// contains filtered or unexported fields
}

Contains the output for CreateAppCookieStickinessPolicy.

func (CreateAppCookieStickinessPolicyOutput) String

String returns the string representation

type CreateAppCookieStickinessPolicyRequest

type CreateAppCookieStickinessPolicyRequest struct {
	*aws.Request
	Input *CreateAppCookieStickinessPolicyInput
	Copy  func(*CreateAppCookieStickinessPolicyInput) CreateAppCookieStickinessPolicyRequest
}

CreateAppCookieStickinessPolicyRequest is the request type for the CreateAppCookieStickinessPolicy API operation.

func (CreateAppCookieStickinessPolicyRequest) Send

Send marshals and sends the CreateAppCookieStickinessPolicy API request.

type CreateAppCookieStickinessPolicyResponse

type CreateAppCookieStickinessPolicyResponse struct {
	*CreateAppCookieStickinessPolicyOutput
	// contains filtered or unexported fields
}

CreateAppCookieStickinessPolicyResponse is the response type for the CreateAppCookieStickinessPolicy API operation.

func (*CreateAppCookieStickinessPolicyResponse) SDKResponseMetdata

func (r *CreateAppCookieStickinessPolicyResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the CreateAppCookieStickinessPolicy request.

type CreateLBCookieStickinessPolicyInput

type CreateLBCookieStickinessPolicyInput struct {

	// The time period, in seconds, after which the cookie should be considered
	// stale. If you do not specify this parameter, the default value is 0, which
	// indicates that the sticky session should last for the duration of the browser
	// session.
	CookieExpirationPeriod *int64 `type:"long"`

	// The name of the load balancer.
	//
	// LoadBalancerName is a required field
	LoadBalancerName *string `type:"string" required:"true"`

	// The name of the policy being created. Policy names must consist of alphanumeric
	// characters and dashes (-). This name must be unique within the set of policies
	// for this load balancer.
	//
	// PolicyName is a required field
	PolicyName *string `type:"string" required:"true"`
	// contains filtered or unexported fields
}

Contains the parameters for CreateLBCookieStickinessPolicy.

func (CreateLBCookieStickinessPolicyInput) String

String returns the string representation

func (*CreateLBCookieStickinessPolicyInput) Validate

Validate inspects the fields of the type to determine if they are valid.

type CreateLBCookieStickinessPolicyOutput

type CreateLBCookieStickinessPolicyOutput struct {
	// contains filtered or unexported fields
}

Contains the output for CreateLBCookieStickinessPolicy.

func (CreateLBCookieStickinessPolicyOutput) String

String returns the string representation

type CreateLBCookieStickinessPolicyRequest

type CreateLBCookieStickinessPolicyRequest struct {
	*aws.Request
	Input *CreateLBCookieStickinessPolicyInput
	Copy  func(*CreateLBCookieStickinessPolicyInput) CreateLBCookieStickinessPolicyRequest
}

CreateLBCookieStickinessPolicyRequest is the request type for the CreateLBCookieStickinessPolicy API operation.

func (CreateLBCookieStickinessPolicyRequest) Send

Send marshals and sends the CreateLBCookieStickinessPolicy API request.

type CreateLBCookieStickinessPolicyResponse

type CreateLBCookieStickinessPolicyResponse struct {
	*CreateLBCookieStickinessPolicyOutput
	// contains filtered or unexported fields
}

CreateLBCookieStickinessPolicyResponse is the response type for the CreateLBCookieStickinessPolicy API operation.

func (*CreateLBCookieStickinessPolicyResponse) SDKResponseMetdata

func (r *CreateLBCookieStickinessPolicyResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the CreateLBCookieStickinessPolicy request.

type CreateLoadBalancerInput

type CreateLoadBalancerInput struct {

	// One or more Availability Zones from the same region as the load balancer.
	//
	// You must specify at least one Availability Zone.
	//
	// You can add more Availability Zones after you create the load balancer using
	// EnableAvailabilityZonesForLoadBalancer.
	AvailabilityZones []string `type:"list"`

	// The listeners.
	//
	// For more information, see Listeners for Your Classic Load Balancer (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-listener-config.html)
	// in the Classic Load Balancers Guide.
	//
	// Listeners is a required field
	Listeners []Listener `type:"list" required:"true"`

	// The name of the load balancer.
	//
	// This name must be unique within your set of load balancers for the region,
	// must have a maximum of 32 characters, must contain only alphanumeric characters
	// or hyphens, and cannot begin or end with a hyphen.
	//
	// LoadBalancerName is a required field
	LoadBalancerName *string `type:"string" required:"true"`

	// The type of a load balancer. Valid only for load balancers in a VPC.
	//
	// By default, Elastic Load Balancing creates an Internet-facing load balancer
	// with a DNS name that resolves to public IP addresses. For more information
	// about Internet-facing and Internal load balancers, see Load Balancer Scheme
	// (http://docs.aws.amazon.com/elasticloadbalancing/latest/userguide/how-elastic-load-balancing-works.html#load-balancer-scheme)
	// in the Elastic Load Balancing User Guide.
	//
	// Specify internal to create a load balancer with a DNS name that resolves
	// to private IP addresses.
	Scheme *string `type:"string"`

	// The IDs of the security groups to assign to the load balancer.
	SecurityGroups []string `type:"list"`

	// The IDs of the subnets in your VPC to attach to the load balancer. Specify
	// one subnet per Availability Zone specified in AvailabilityZones.
	Subnets []string `type:"list"`

	// A list of tags to assign to the load balancer.
	//
	// For more information about tagging your load balancer, see Tag Your Classic
	// Load Balancer (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/add-remove-tags.html)
	// in the Classic Load Balancers Guide.
	Tags []Tag `min:"1" type:"list"`
	// contains filtered or unexported fields
}

Contains the parameters for CreateLoadBalancer.

func (CreateLoadBalancerInput) String

func (s CreateLoadBalancerInput) String() string

String returns the string representation

func (*CreateLoadBalancerInput) Validate

func (s *CreateLoadBalancerInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type CreateLoadBalancerListenersInput

type CreateLoadBalancerListenersInput struct {

	// The listeners.
	//
	// Listeners is a required field
	Listeners []Listener `type:"list" required:"true"`

	// The name of the load balancer.
	//
	// LoadBalancerName is a required field
	LoadBalancerName *string `type:"string" required:"true"`
	// contains filtered or unexported fields
}

Contains the parameters for CreateLoadBalancerListeners.

func (CreateLoadBalancerListenersInput) String

String returns the string representation

func (*CreateLoadBalancerListenersInput) Validate

Validate inspects the fields of the type to determine if they are valid.

type CreateLoadBalancerListenersOutput

type CreateLoadBalancerListenersOutput struct {
	// contains filtered or unexported fields
}

Contains the parameters for CreateLoadBalancerListener.

func (CreateLoadBalancerListenersOutput) String

String returns the string representation

type CreateLoadBalancerListenersRequest

type CreateLoadBalancerListenersRequest struct {
	*aws.Request
	Input *CreateLoadBalancerListenersInput
	Copy  func(*CreateLoadBalancerListenersInput) CreateLoadBalancerListenersRequest
}

CreateLoadBalancerListenersRequest is the request type for the CreateLoadBalancerListeners API operation.

func (CreateLoadBalancerListenersRequest) Send

Send marshals and sends the CreateLoadBalancerListeners API request.

type CreateLoadBalancerListenersResponse

type CreateLoadBalancerListenersResponse struct {
	*CreateLoadBalancerListenersOutput
	// contains filtered or unexported fields
}

CreateLoadBalancerListenersResponse is the response type for the CreateLoadBalancerListeners API operation.

func (*CreateLoadBalancerListenersResponse) SDKResponseMetdata

func (r *CreateLoadBalancerListenersResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the CreateLoadBalancerListeners request.

type CreateLoadBalancerOutput

type CreateLoadBalancerOutput struct {

	// The DNS name of the load balancer.
	DNSName *string `type:"string"`
	// contains filtered or unexported fields
}

Contains the output for CreateLoadBalancer.

func (CreateLoadBalancerOutput) String

func (s CreateLoadBalancerOutput) String() string

String returns the string representation

type CreateLoadBalancerPolicyInput

type CreateLoadBalancerPolicyInput struct {

	// The name of the load balancer.
	//
	// LoadBalancerName is a required field
	LoadBalancerName *string `type:"string" required:"true"`

	// The policy attributes.
	PolicyAttributes []PolicyAttribute `type:"list"`

	// The name of the load balancer policy to be created. This name must be unique
	// within the set of policies for this load balancer.
	//
	// PolicyName is a required field
	PolicyName *string `type:"string" required:"true"`

	// The name of the base policy type. To get the list of policy types, use DescribeLoadBalancerPolicyTypes.
	//
	// PolicyTypeName is a required field
	PolicyTypeName *string `type:"string" required:"true"`
	// contains filtered or unexported fields
}

Contains the parameters for CreateLoadBalancerPolicy.

func (CreateLoadBalancerPolicyInput) String

String returns the string representation

func (*CreateLoadBalancerPolicyInput) Validate

func (s *CreateLoadBalancerPolicyInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type CreateLoadBalancerPolicyOutput

type CreateLoadBalancerPolicyOutput struct {
	// contains filtered or unexported fields
}

Contains the output of CreateLoadBalancerPolicy.

func (CreateLoadBalancerPolicyOutput) String

String returns the string representation

type CreateLoadBalancerPolicyRequest

type CreateLoadBalancerPolicyRequest struct {
	*aws.Request
	Input *CreateLoadBalancerPolicyInput
	Copy  func(*CreateLoadBalancerPolicyInput) CreateLoadBalancerPolicyRequest
}

CreateLoadBalancerPolicyRequest is the request type for the CreateLoadBalancerPolicy API operation.

func (CreateLoadBalancerPolicyRequest) Send

Send marshals and sends the CreateLoadBalancerPolicy API request.

type CreateLoadBalancerPolicyResponse

type CreateLoadBalancerPolicyResponse struct {
	*CreateLoadBalancerPolicyOutput
	// contains filtered or unexported fields
}

CreateLoadBalancerPolicyResponse is the response type for the CreateLoadBalancerPolicy API operation.

func (*CreateLoadBalancerPolicyResponse) SDKResponseMetdata

func (r *CreateLoadBalancerPolicyResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the CreateLoadBalancerPolicy request.

type CreateLoadBalancerRequest

type CreateLoadBalancerRequest struct {
	*aws.Request
	Input *CreateLoadBalancerInput
	Copy  func(*CreateLoadBalancerInput) CreateLoadBalancerRequest
}

CreateLoadBalancerRequest is the request type for the CreateLoadBalancer API operation.

func (CreateLoadBalancerRequest) Send

Send marshals and sends the CreateLoadBalancer API request.

type CreateLoadBalancerResponse

type CreateLoadBalancerResponse struct {
	*CreateLoadBalancerOutput
	// contains filtered or unexported fields
}

CreateLoadBalancerResponse is the response type for the CreateLoadBalancer API operation.

func (*CreateLoadBalancerResponse) SDKResponseMetdata

func (r *CreateLoadBalancerResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the CreateLoadBalancer request.

type CrossZoneLoadBalancing

type CrossZoneLoadBalancing struct {

	// Specifies whether cross-zone load balancing is enabled for the load balancer.
	//
	// Enabled is a required field
	Enabled *bool `type:"boolean" required:"true"`
	// contains filtered or unexported fields
}

Information about the CrossZoneLoadBalancing attribute.

func (CrossZoneLoadBalancing) String

func (s CrossZoneLoadBalancing) String() string

String returns the string representation

func (*CrossZoneLoadBalancing) Validate

func (s *CrossZoneLoadBalancing) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type DeleteLoadBalancerInput

type DeleteLoadBalancerInput struct {

	// The name of the load balancer.
	//
	// LoadBalancerName is a required field
	LoadBalancerName *string `type:"string" required:"true"`
	// contains filtered or unexported fields
}

Contains the parameters for DeleteLoadBalancer.

func (DeleteLoadBalancerInput) String

func (s DeleteLoadBalancerInput) String() string

String returns the string representation

func (*DeleteLoadBalancerInput) Validate

func (s *DeleteLoadBalancerInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type DeleteLoadBalancerListenersInput

type DeleteLoadBalancerListenersInput struct {

	// The name of the load balancer.
	//
	// LoadBalancerName is a required field
	LoadBalancerName *string `type:"string" required:"true"`

	// The client port numbers of the listeners.
	//
	// LoadBalancerPorts is a required field
	LoadBalancerPorts []int64 `type:"list" required:"true"`
	// contains filtered or unexported fields
}

Contains the parameters for DeleteLoadBalancerListeners.

func (DeleteLoadBalancerListenersInput) String

String returns the string representation

func (*DeleteLoadBalancerListenersInput) Validate

Validate inspects the fields of the type to determine if they are valid.

type DeleteLoadBalancerListenersOutput

type DeleteLoadBalancerListenersOutput struct {
	// contains filtered or unexported fields
}

Contains the output of DeleteLoadBalancerListeners.

func (DeleteLoadBalancerListenersOutput) String

String returns the string representation

type DeleteLoadBalancerListenersRequest

type DeleteLoadBalancerListenersRequest struct {
	*aws.Request
	Input *DeleteLoadBalancerListenersInput
	Copy  func(*DeleteLoadBalancerListenersInput) DeleteLoadBalancerListenersRequest
}

DeleteLoadBalancerListenersRequest is the request type for the DeleteLoadBalancerListeners API operation.

func (DeleteLoadBalancerListenersRequest) Send

Send marshals and sends the DeleteLoadBalancerListeners API request.

type DeleteLoadBalancerListenersResponse

type DeleteLoadBalancerListenersResponse struct {
	*DeleteLoadBalancerListenersOutput
	// contains filtered or unexported fields
}

DeleteLoadBalancerListenersResponse is the response type for the DeleteLoadBalancerListeners API operation.

func (*DeleteLoadBalancerListenersResponse) SDKResponseMetdata

func (r *DeleteLoadBalancerListenersResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the DeleteLoadBalancerListeners request.

type DeleteLoadBalancerOutput

type DeleteLoadBalancerOutput struct {
	// contains filtered or unexported fields
}

Contains the output of DeleteLoadBalancer.

func (DeleteLoadBalancerOutput) String

func (s DeleteLoadBalancerOutput) String() string

String returns the string representation

type DeleteLoadBalancerPolicyInput

type DeleteLoadBalancerPolicyInput struct {

	// The name of the load balancer.
	//
	// LoadBalancerName is a required field
	LoadBalancerName *string `type:"string" required:"true"`

	// The name of the policy.
	//
	// PolicyName is a required field
	PolicyName *string `type:"string" required:"true"`
	// contains filtered or unexported fields
}

Contains the parameters for DeleteLoadBalancerPolicy.

func (DeleteLoadBalancerPolicyInput) String

String returns the string representation

func (*DeleteLoadBalancerPolicyInput) Validate

func (s *DeleteLoadBalancerPolicyInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type DeleteLoadBalancerPolicyOutput

type DeleteLoadBalancerPolicyOutput struct {
	// contains filtered or unexported fields
}

Contains the output of DeleteLoadBalancerPolicy.

func (DeleteLoadBalancerPolicyOutput) String

String returns the string representation

type DeleteLoadBalancerPolicyRequest

type DeleteLoadBalancerPolicyRequest struct {
	*aws.Request
	Input *DeleteLoadBalancerPolicyInput
	Copy  func(*DeleteLoadBalancerPolicyInput) DeleteLoadBalancerPolicyRequest
}

DeleteLoadBalancerPolicyRequest is the request type for the DeleteLoadBalancerPolicy API operation.

func (DeleteLoadBalancerPolicyRequest) Send

Send marshals and sends the DeleteLoadBalancerPolicy API request.

type DeleteLoadBalancerPolicyResponse

type DeleteLoadBalancerPolicyResponse struct {
	*DeleteLoadBalancerPolicyOutput
	// contains filtered or unexported fields
}

DeleteLoadBalancerPolicyResponse is the response type for the DeleteLoadBalancerPolicy API operation.

func (*DeleteLoadBalancerPolicyResponse) SDKResponseMetdata

func (r *DeleteLoadBalancerPolicyResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the DeleteLoadBalancerPolicy request.

type DeleteLoadBalancerRequest

type DeleteLoadBalancerRequest struct {
	*aws.Request
	Input *DeleteLoadBalancerInput
	Copy  func(*DeleteLoadBalancerInput) DeleteLoadBalancerRequest
}

DeleteLoadBalancerRequest is the request type for the DeleteLoadBalancer API operation.

func (DeleteLoadBalancerRequest) Send

Send marshals and sends the DeleteLoadBalancer API request.

type DeleteLoadBalancerResponse

type DeleteLoadBalancerResponse struct {
	*DeleteLoadBalancerOutput
	// contains filtered or unexported fields
}

DeleteLoadBalancerResponse is the response type for the DeleteLoadBalancer API operation.

func (*DeleteLoadBalancerResponse) SDKResponseMetdata

func (r *DeleteLoadBalancerResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the DeleteLoadBalancer request.

type DeregisterInstancesFromLoadBalancerInput

type DeregisterInstancesFromLoadBalancerInput struct {

	// The IDs of the instances.
	//
	// Instances is a required field
	Instances []Instance `type:"list" required:"true"`

	// The name of the load balancer.
	//
	// LoadBalancerName is a required field
	LoadBalancerName *string `type:"string" required:"true"`
	// contains filtered or unexported fields
}

Contains the parameters for DeregisterInstancesFromLoadBalancer.

func (DeregisterInstancesFromLoadBalancerInput) String

String returns the string representation

func (*DeregisterInstancesFromLoadBalancerInput) Validate

Validate inspects the fields of the type to determine if they are valid.

type DeregisterInstancesFromLoadBalancerOutput

type DeregisterInstancesFromLoadBalancerOutput struct {

	// The remaining instances registered with the load balancer.
	Instances []Instance `type:"list"`
	// contains filtered or unexported fields
}

Contains the output of DeregisterInstancesFromLoadBalancer.

func (DeregisterInstancesFromLoadBalancerOutput) String

String returns the string representation

type DeregisterInstancesFromLoadBalancerRequest

DeregisterInstancesFromLoadBalancerRequest is the request type for the DeregisterInstancesFromLoadBalancer API operation.

func (DeregisterInstancesFromLoadBalancerRequest) Send

Send marshals and sends the DeregisterInstancesFromLoadBalancer API request.

type DeregisterInstancesFromLoadBalancerResponse

type DeregisterInstancesFromLoadBalancerResponse struct {
	*DeregisterInstancesFromLoadBalancerOutput
	// contains filtered or unexported fields
}

DeregisterInstancesFromLoadBalancerResponse is the response type for the DeregisterInstancesFromLoadBalancer API operation.

func (*DeregisterInstancesFromLoadBalancerResponse) SDKResponseMetdata

func (r *DeregisterInstancesFromLoadBalancerResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the DeregisterInstancesFromLoadBalancer request.

type DescribeAccountLimitsInput

type DescribeAccountLimitsInput struct {

	// The marker for the next set of results. (You received this marker from a
	// previous call.)
	Marker *string `type:"string"`

	// The maximum number of results to return with this call.
	PageSize *int64 `min:"1" type:"integer"`
	// contains filtered or unexported fields
}

func (DescribeAccountLimitsInput) String

String returns the string representation

func (*DescribeAccountLimitsInput) Validate

func (s *DescribeAccountLimitsInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type DescribeAccountLimitsOutput

type DescribeAccountLimitsOutput struct {

	// Information about the limits.
	Limits []Limit `type:"list"`

	// The marker to use when requesting the next set of results. If there are no
	// additional results, the string is empty.
	NextMarker *string `type:"string"`
	// contains filtered or unexported fields
}

func (DescribeAccountLimitsOutput) String

String returns the string representation

type DescribeAccountLimitsRequest

type DescribeAccountLimitsRequest struct {
	*aws.Request
	Input *DescribeAccountLimitsInput
	Copy  func(*DescribeAccountLimitsInput) DescribeAccountLimitsRequest
}

DescribeAccountLimitsRequest is the request type for the DescribeAccountLimits API operation.

func (DescribeAccountLimitsRequest) Send

Send marshals and sends the DescribeAccountLimits API request.

type DescribeAccountLimitsResponse

type DescribeAccountLimitsResponse struct {
	*DescribeAccountLimitsOutput
	// contains filtered or unexported fields
}

DescribeAccountLimitsResponse is the response type for the DescribeAccountLimits API operation.

func (*DescribeAccountLimitsResponse) SDKResponseMetdata

func (r *DescribeAccountLimitsResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the DescribeAccountLimits request.

type DescribeInstanceHealthInput

type DescribeInstanceHealthInput struct {

	// The IDs of the instances.
	Instances []Instance `type:"list"`

	// The name of the load balancer.
	//
	// LoadBalancerName is a required field
	LoadBalancerName *string `type:"string" required:"true"`
	// contains filtered or unexported fields
}

Contains the parameters for DescribeInstanceHealth.

func (DescribeInstanceHealthInput) String

String returns the string representation

func (*DescribeInstanceHealthInput) Validate

func (s *DescribeInstanceHealthInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type DescribeInstanceHealthOutput

type DescribeInstanceHealthOutput struct {

	// Information about the health of the instances.
	InstanceStates []InstanceState `type:"list"`
	// contains filtered or unexported fields
}

Contains the output for DescribeInstanceHealth.

func (DescribeInstanceHealthOutput) String

String returns the string representation

type DescribeInstanceHealthRequest

type DescribeInstanceHealthRequest struct {
	*aws.Request
	Input *DescribeInstanceHealthInput
	Copy  func(*DescribeInstanceHealthInput) DescribeInstanceHealthRequest
}

DescribeInstanceHealthRequest is the request type for the DescribeInstanceHealth API operation.

func (DescribeInstanceHealthRequest) Send

Send marshals and sends the DescribeInstanceHealth API request.

type DescribeInstanceHealthResponse

type DescribeInstanceHealthResponse struct {
	*DescribeInstanceHealthOutput
	// contains filtered or unexported fields
}

DescribeInstanceHealthResponse is the response type for the DescribeInstanceHealth API operation.

func (*DescribeInstanceHealthResponse) SDKResponseMetdata

func (r *DescribeInstanceHealthResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the DescribeInstanceHealth request.

type DescribeLoadBalancerAttributesInput

type DescribeLoadBalancerAttributesInput struct {

	// The name of the load balancer.
	//
	// LoadBalancerName is a required field
	LoadBalancerName *string `type:"string" required:"true"`
	// contains filtered or unexported fields
}

Contains the parameters for DescribeLoadBalancerAttributes.

func (DescribeLoadBalancerAttributesInput) String

String returns the string representation

func (*DescribeLoadBalancerAttributesInput) Validate

Validate inspects the fields of the type to determine if they are valid.

type DescribeLoadBalancerAttributesOutput

type DescribeLoadBalancerAttributesOutput struct {

	// Information about the load balancer attributes.
	LoadBalancerAttributes *LoadBalancerAttributes `type:"structure"`
	// contains filtered or unexported fields
}

Contains the output of DescribeLoadBalancerAttributes.

func (DescribeLoadBalancerAttributesOutput) String

String returns the string representation

type DescribeLoadBalancerAttributesRequest

type DescribeLoadBalancerAttributesRequest struct {
	*aws.Request
	Input *DescribeLoadBalancerAttributesInput
	Copy  func(*DescribeLoadBalancerAttributesInput) DescribeLoadBalancerAttributesRequest
}

DescribeLoadBalancerAttributesRequest is the request type for the DescribeLoadBalancerAttributes API operation.

func (DescribeLoadBalancerAttributesRequest) Send

Send marshals and sends the DescribeLoadBalancerAttributes API request.

type DescribeLoadBalancerAttributesResponse

type DescribeLoadBalancerAttributesResponse struct {
	*DescribeLoadBalancerAttributesOutput
	// contains filtered or unexported fields
}

DescribeLoadBalancerAttributesResponse is the response type for the DescribeLoadBalancerAttributes API operation.

func (*DescribeLoadBalancerAttributesResponse) SDKResponseMetdata

func (r *DescribeLoadBalancerAttributesResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the DescribeLoadBalancerAttributes request.

type DescribeLoadBalancerPoliciesInput

type DescribeLoadBalancerPoliciesInput struct {

	// The name of the load balancer.
	LoadBalancerName *string `type:"string"`

	// The names of the policies.
	PolicyNames []string `type:"list"`
	// contains filtered or unexported fields
}

Contains the parameters for DescribeLoadBalancerPolicies.

func (DescribeLoadBalancerPoliciesInput) String

String returns the string representation

type DescribeLoadBalancerPoliciesOutput

type DescribeLoadBalancerPoliciesOutput struct {

	// Information about the policies.
	PolicyDescriptions []PolicyDescription `type:"list"`
	// contains filtered or unexported fields
}

Contains the output of DescribeLoadBalancerPolicies.

func (DescribeLoadBalancerPoliciesOutput) String

String returns the string representation

type DescribeLoadBalancerPoliciesRequest

type DescribeLoadBalancerPoliciesRequest struct {
	*aws.Request
	Input *DescribeLoadBalancerPoliciesInput
	Copy  func(*DescribeLoadBalancerPoliciesInput) DescribeLoadBalancerPoliciesRequest
}

DescribeLoadBalancerPoliciesRequest is the request type for the DescribeLoadBalancerPolicies API operation.

func (DescribeLoadBalancerPoliciesRequest) Send

Send marshals and sends the DescribeLoadBalancerPolicies API request.

type DescribeLoadBalancerPoliciesResponse

type DescribeLoadBalancerPoliciesResponse struct {
	*DescribeLoadBalancerPoliciesOutput
	// contains filtered or unexported fields
}

DescribeLoadBalancerPoliciesResponse is the response type for the DescribeLoadBalancerPolicies API operation.

func (*DescribeLoadBalancerPoliciesResponse) SDKResponseMetdata

func (r *DescribeLoadBalancerPoliciesResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the DescribeLoadBalancerPolicies request.

type DescribeLoadBalancerPolicyTypesInput

type DescribeLoadBalancerPolicyTypesInput struct {

	// The names of the policy types. If no names are specified, describes all policy
	// types defined by Elastic Load Balancing.
	PolicyTypeNames []string `type:"list"`
	// contains filtered or unexported fields
}

Contains the parameters for DescribeLoadBalancerPolicyTypes.

func (DescribeLoadBalancerPolicyTypesInput) String

String returns the string representation

type DescribeLoadBalancerPolicyTypesOutput

type DescribeLoadBalancerPolicyTypesOutput struct {

	// Information about the policy types.
	PolicyTypeDescriptions []PolicyTypeDescription `type:"list"`
	// contains filtered or unexported fields
}

Contains the output of DescribeLoadBalancerPolicyTypes.

func (DescribeLoadBalancerPolicyTypesOutput) String

String returns the string representation

type DescribeLoadBalancerPolicyTypesRequest

type DescribeLoadBalancerPolicyTypesRequest struct {
	*aws.Request
	Input *DescribeLoadBalancerPolicyTypesInput
	Copy  func(*DescribeLoadBalancerPolicyTypesInput) DescribeLoadBalancerPolicyTypesRequest
}

DescribeLoadBalancerPolicyTypesRequest is the request type for the DescribeLoadBalancerPolicyTypes API operation.

func (DescribeLoadBalancerPolicyTypesRequest) Send

Send marshals and sends the DescribeLoadBalancerPolicyTypes API request.

type DescribeLoadBalancerPolicyTypesResponse

type DescribeLoadBalancerPolicyTypesResponse struct {
	*DescribeLoadBalancerPolicyTypesOutput
	// contains filtered or unexported fields
}

DescribeLoadBalancerPolicyTypesResponse is the response type for the DescribeLoadBalancerPolicyTypes API operation.

func (*DescribeLoadBalancerPolicyTypesResponse) SDKResponseMetdata

func (r *DescribeLoadBalancerPolicyTypesResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the DescribeLoadBalancerPolicyTypes request.

type DescribeLoadBalancersInput

type DescribeLoadBalancersInput struct {

	// The names of the load balancers.
	LoadBalancerNames []string `type:"list"`

	// The marker for the next set of results. (You received this marker from a
	// previous call.)
	Marker *string `type:"string"`

	// The maximum number of results to return with this call (a number from 1 to
	// 400). The default is 400.
	PageSize *int64 `min:"1" type:"integer"`
	// contains filtered or unexported fields
}

Contains the parameters for DescribeLoadBalancers.

func (DescribeLoadBalancersInput) String

String returns the string representation

func (*DescribeLoadBalancersInput) Validate

func (s *DescribeLoadBalancersInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type DescribeLoadBalancersOutput

type DescribeLoadBalancersOutput struct {

	// Information about the load balancers.
	LoadBalancerDescriptions []LoadBalancerDescription `type:"list"`

	// The marker to use when requesting the next set of results. If there are no
	// additional results, the string is empty.
	NextMarker *string `type:"string"`
	// contains filtered or unexported fields
}

Contains the parameters for DescribeLoadBalancers.

func (DescribeLoadBalancersOutput) String

String returns the string representation

type DescribeLoadBalancersPaginator

type DescribeLoadBalancersPaginator struct {
	aws.Pager
}

DescribeLoadBalancersPaginator is used to paginate the request. This can be done by calling Next and CurrentPage.

func NewDescribeLoadBalancersPaginator

func NewDescribeLoadBalancersPaginator(req DescribeLoadBalancersRequest) DescribeLoadBalancersPaginator

NewDescribeLoadBalancersRequestPaginator returns a paginator for DescribeLoadBalancers. Use Next method to get the next page, and CurrentPage to get the current response page from the paginator. Next will return false, if there are no more pages, or an error was encountered.

Note: This operation can generate multiple requests to a service.

// Example iterating over pages.
req := client.DescribeLoadBalancersRequest(input)
p := elasticloadbalancing.NewDescribeLoadBalancersRequestPaginator(req)

for p.Next(context.TODO()) {
    page := p.CurrentPage()
}

if err := p.Err(); err != nil {
    return err
}

func (*DescribeLoadBalancersPaginator) CurrentPage

type DescribeLoadBalancersRequest

type DescribeLoadBalancersRequest struct {
	*aws.Request
	Input *DescribeLoadBalancersInput
	Copy  func(*DescribeLoadBalancersInput) DescribeLoadBalancersRequest
}

DescribeLoadBalancersRequest is the request type for the DescribeLoadBalancers API operation.

func (DescribeLoadBalancersRequest) Send

Send marshals and sends the DescribeLoadBalancers API request.

type DescribeLoadBalancersResponse

type DescribeLoadBalancersResponse struct {
	*DescribeLoadBalancersOutput
	// contains filtered or unexported fields
}

DescribeLoadBalancersResponse is the response type for the DescribeLoadBalancers API operation.

func (*DescribeLoadBalancersResponse) SDKResponseMetdata

func (r *DescribeLoadBalancersResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the DescribeLoadBalancers request.

type DescribeTagsInput

type DescribeTagsInput struct {

	// The names of the load balancers.
	//
	// LoadBalancerNames is a required field
	LoadBalancerNames []string `min:"1" type:"list" required:"true"`
	// contains filtered or unexported fields
}

Contains the parameters for DescribeTags.

func (DescribeTagsInput) String

func (s DescribeTagsInput) String() string

String returns the string representation

func (*DescribeTagsInput) Validate

func (s *DescribeTagsInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type DescribeTagsOutput

type DescribeTagsOutput struct {

	// Information about the tags.
	TagDescriptions []TagDescription `type:"list"`
	// contains filtered or unexported fields
}

Contains the output for DescribeTags.

func (DescribeTagsOutput) String

func (s DescribeTagsOutput) String() string

String returns the string representation

type DescribeTagsRequest

type DescribeTagsRequest struct {
	*aws.Request
	Input *DescribeTagsInput
	Copy  func(*DescribeTagsInput) DescribeTagsRequest
}

DescribeTagsRequest is the request type for the DescribeTags API operation.

func (DescribeTagsRequest) Send

Send marshals and sends the DescribeTags API request.

type DescribeTagsResponse

type DescribeTagsResponse struct {
	*DescribeTagsOutput
	// contains filtered or unexported fields
}

DescribeTagsResponse is the response type for the DescribeTags API operation.

func (*DescribeTagsResponse) SDKResponseMetdata

func (r *DescribeTagsResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the DescribeTags request.

type DetachLoadBalancerFromSubnetsInput

type DetachLoadBalancerFromSubnetsInput struct {

	// The name of the load balancer.
	//
	// LoadBalancerName is a required field
	LoadBalancerName *string `type:"string" required:"true"`

	// The IDs of the subnets.
	//
	// Subnets is a required field
	Subnets []string `type:"list" required:"true"`
	// contains filtered or unexported fields
}

Contains the parameters for DetachLoadBalancerFromSubnets.

func (DetachLoadBalancerFromSubnetsInput) String

String returns the string representation

func (*DetachLoadBalancerFromSubnetsInput) Validate

Validate inspects the fields of the type to determine if they are valid.

type DetachLoadBalancerFromSubnetsOutput

type DetachLoadBalancerFromSubnetsOutput struct {

	// The IDs of the remaining subnets for the load balancer.
	Subnets []string `type:"list"`
	// contains filtered or unexported fields
}

Contains the output of DetachLoadBalancerFromSubnets.

func (DetachLoadBalancerFromSubnetsOutput) String

String returns the string representation

type DetachLoadBalancerFromSubnetsRequest

type DetachLoadBalancerFromSubnetsRequest struct {
	*aws.Request
	Input *DetachLoadBalancerFromSubnetsInput
	Copy  func(*DetachLoadBalancerFromSubnetsInput) DetachLoadBalancerFromSubnetsRequest
}

DetachLoadBalancerFromSubnetsRequest is the request type for the DetachLoadBalancerFromSubnets API operation.

func (DetachLoadBalancerFromSubnetsRequest) Send

Send marshals and sends the DetachLoadBalancerFromSubnets API request.

type DetachLoadBalancerFromSubnetsResponse

type DetachLoadBalancerFromSubnetsResponse struct {
	*DetachLoadBalancerFromSubnetsOutput
	// contains filtered or unexported fields
}

DetachLoadBalancerFromSubnetsResponse is the response type for the DetachLoadBalancerFromSubnets API operation.

func (*DetachLoadBalancerFromSubnetsResponse) SDKResponseMetdata

func (r *DetachLoadBalancerFromSubnetsResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the DetachLoadBalancerFromSubnets request.

type DisableAvailabilityZonesForLoadBalancerInput

type DisableAvailabilityZonesForLoadBalancerInput struct {

	// The Availability Zones.
	//
	// AvailabilityZones is a required field
	AvailabilityZones []string `type:"list" required:"true"`

	// The name of the load balancer.
	//
	// LoadBalancerName is a required field
	LoadBalancerName *string `type:"string" required:"true"`
	// contains filtered or unexported fields
}

Contains the parameters for DisableAvailabilityZonesForLoadBalancer.

func (DisableAvailabilityZonesForLoadBalancerInput) String

String returns the string representation

func (*DisableAvailabilityZonesForLoadBalancerInput) Validate

Validate inspects the fields of the type to determine if they are valid.

type DisableAvailabilityZonesForLoadBalancerOutput

type DisableAvailabilityZonesForLoadBalancerOutput struct {

	// The remaining Availability Zones for the load balancer.
	AvailabilityZones []string `type:"list"`
	// contains filtered or unexported fields
}

Contains the output for DisableAvailabilityZonesForLoadBalancer.

func (DisableAvailabilityZonesForLoadBalancerOutput) String

String returns the string representation

type DisableAvailabilityZonesForLoadBalancerRequest

DisableAvailabilityZonesForLoadBalancerRequest is the request type for the DisableAvailabilityZonesForLoadBalancer API operation.

func (DisableAvailabilityZonesForLoadBalancerRequest) Send

Send marshals and sends the DisableAvailabilityZonesForLoadBalancer API request.

type DisableAvailabilityZonesForLoadBalancerResponse

type DisableAvailabilityZonesForLoadBalancerResponse struct {
	*DisableAvailabilityZonesForLoadBalancerOutput
	// contains filtered or unexported fields
}

DisableAvailabilityZonesForLoadBalancerResponse is the response type for the DisableAvailabilityZonesForLoadBalancer API operation.

func (*DisableAvailabilityZonesForLoadBalancerResponse) SDKResponseMetdata

SDKResponseMetdata returns the response metadata for the DisableAvailabilityZonesForLoadBalancer request.

type EnableAvailabilityZonesForLoadBalancerInput

type EnableAvailabilityZonesForLoadBalancerInput struct {

	// The Availability Zones. These must be in the same region as the load balancer.
	//
	// AvailabilityZones is a required field
	AvailabilityZones []string `type:"list" required:"true"`

	// The name of the load balancer.
	//
	// LoadBalancerName is a required field
	LoadBalancerName *string `type:"string" required:"true"`
	// contains filtered or unexported fields
}

Contains the parameters for EnableAvailabilityZonesForLoadBalancer.

func (EnableAvailabilityZonesForLoadBalancerInput) String

String returns the string representation

func (*EnableAvailabilityZonesForLoadBalancerInput) Validate

Validate inspects the fields of the type to determine if they are valid.

type EnableAvailabilityZonesForLoadBalancerOutput

type EnableAvailabilityZonesForLoadBalancerOutput struct {

	// The updated list of Availability Zones for the load balancer.
	AvailabilityZones []string `type:"list"`
	// contains filtered or unexported fields
}

Contains the output of EnableAvailabilityZonesForLoadBalancer.

func (EnableAvailabilityZonesForLoadBalancerOutput) String

String returns the string representation

type EnableAvailabilityZonesForLoadBalancerRequest

EnableAvailabilityZonesForLoadBalancerRequest is the request type for the EnableAvailabilityZonesForLoadBalancer API operation.

func (EnableAvailabilityZonesForLoadBalancerRequest) Send

Send marshals and sends the EnableAvailabilityZonesForLoadBalancer API request.

type EnableAvailabilityZonesForLoadBalancerResponse

type EnableAvailabilityZonesForLoadBalancerResponse struct {
	*EnableAvailabilityZonesForLoadBalancerOutput
	// contains filtered or unexported fields
}

EnableAvailabilityZonesForLoadBalancerResponse is the response type for the EnableAvailabilityZonesForLoadBalancer API operation.

func (*EnableAvailabilityZonesForLoadBalancerResponse) SDKResponseMetdata

SDKResponseMetdata returns the response metadata for the EnableAvailabilityZonesForLoadBalancer request.

type HealthCheck

type HealthCheck struct {

	// The number of consecutive health checks successes required before moving
	// the instance to the Healthy state.
	//
	// HealthyThreshold is a required field
	HealthyThreshold *int64 `min:"2" type:"integer" required:"true"`

	// The approximate interval, in seconds, between health checks of an individual
	// instance.
	//
	// Interval is a required field
	Interval *int64 `min:"5" type:"integer" required:"true"`

	// The instance being checked. The protocol is either TCP, HTTP, HTTPS, or SSL.
	// The range of valid ports is one (1) through 65535.
	//
	// TCP is the default, specified as a TCP: port pair, for example "TCP:5000".
	// In this case, a health check simply attempts to open a TCP connection to
	// the instance on the specified port. Failure to connect within the configured
	// timeout is considered unhealthy.
	//
	// SSL is also specified as SSL: port pair, for example, SSL:5000.
	//
	// For HTTP/HTTPS, you must include a ping path in the string. HTTP is specified
	// as a HTTP:port;/;PathToPing; grouping, for example "HTTP:80/weather/us/wa/seattle".
	// In this case, a HTTP GET request is issued to the instance on the given port
	// and path. Any answer other than "200 OK" within the timeout period is considered
	// unhealthy.
	//
	// The total length of the HTTP ping target must be 1024 16-bit Unicode characters
	// or less.
	//
	// Target is a required field
	Target *string `type:"string" required:"true"`

	// The amount of time, in seconds, during which no response means a failed health
	// check.
	//
	// This value must be less than the Interval value.
	//
	// Timeout is a required field
	Timeout *int64 `min:"2" type:"integer" required:"true"`

	// The number of consecutive health check failures required before moving the
	// instance to the Unhealthy state.
	//
	// UnhealthyThreshold is a required field
	UnhealthyThreshold *int64 `min:"2" type:"integer" required:"true"`
	// contains filtered or unexported fields
}

Information about a health check.

func (HealthCheck) String

func (s HealthCheck) String() string

String returns the string representation

func (*HealthCheck) Validate

func (s *HealthCheck) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type Instance

type Instance struct {

	// The instance ID.
	InstanceId *string `type:"string"`
	// contains filtered or unexported fields
}

The ID of an EC2 instance.

func (Instance) String

func (s Instance) String() string

String returns the string representation

type InstanceState

type InstanceState struct {

	// A description of the instance state. This string can contain one or more
	// of the following messages.
	//
	//    * N/A
	//
	//    * A transient error occurred. Please try again later.
	//
	//    * Instance has failed at least the UnhealthyThreshold number of health
	//    checks consecutively.
	//
	//    * Instance has not passed the configured HealthyThreshold number of health
	//    checks consecutively.
	//
	//    * Instance registration is still in progress.
	//
	//    * Instance is in the EC2 Availability Zone for which LoadBalancer is not
	//    configured to route traffic to.
	//
	//    * Instance is not currently registered with the LoadBalancer.
	//
	//    * Instance deregistration currently in progress.
	//
	//    * Disable Availability Zone is currently in progress.
	//
	//    * Instance is in pending state.
	//
	//    * Instance is in stopped state.
	//
	//    * Instance is in terminated state.
	Description *string `type:"string"`

	// The ID of the instance.
	InstanceId *string `type:"string"`

	// Information about the cause of OutOfService instances. Specifically, whether
	// the cause is Elastic Load Balancing or the instance.
	//
	// Valid values: ELB | Instance | N/A
	ReasonCode *string `type:"string"`

	// The current state of the instance.
	//
	// Valid values: InService | OutOfService | Unknown
	State *string `type:"string"`
	// contains filtered or unexported fields
}

Information about the state of an EC2 instance.

func (InstanceState) String

func (s InstanceState) String() string

String returns the string representation

type LBCookieStickinessPolicy

type LBCookieStickinessPolicy struct {

	// The time period, in seconds, after which the cookie should be considered
	// stale. If this parameter is not specified, the stickiness session lasts for
	// the duration of the browser session.
	CookieExpirationPeriod *int64 `type:"long"`

	// The name of the policy. This name must be unique within the set of policies
	// for this load balancer.
	PolicyName *string `type:"string"`
	// contains filtered or unexported fields
}

Information about a policy for duration-based session stickiness.

func (LBCookieStickinessPolicy) String

func (s LBCookieStickinessPolicy) String() string

String returns the string representation

type Limit

type Limit struct {

	// The maximum value of the limit.
	Max *string `type:"string"`

	// The name of the limit. The possible values are:
	//
	//    * classic-listeners
	//
	//    * classic-load-balancers
	//
	//    * classic-registered-instances
	Name *string `type:"string"`
	// contains filtered or unexported fields
}

Information about an Elastic Load Balancing resource limit for your AWS account.

func (Limit) String

func (s Limit) String() string

String returns the string representation

type Listener

type Listener struct {

	// The port on which the instance is listening.
	//
	// InstancePort is a required field
	InstancePort *int64 `min:"1" type:"integer" required:"true"`

	// The protocol to use for routing traffic to instances: HTTP, HTTPS, TCP, or
	// SSL.
	//
	// If the front-end protocol is HTTP, HTTPS, TCP, or SSL, InstanceProtocol must
	// be at the same protocol.
	//
	// If there is another listener with the same InstancePort whose InstanceProtocol
	// is secure, (HTTPS or SSL), the listener's InstanceProtocol must also be secure.
	//
	// If there is another listener with the same InstancePort whose InstanceProtocol
	// is HTTP or TCP, the listener's InstanceProtocol must be HTTP or TCP.
	InstanceProtocol *string `type:"string"`

	// The port on which the load balancer is listening. On EC2-VPC, you can specify
	// any port from the range 1-65535. On EC2-Classic, you can specify any port
	// from the following list: 25, 80, 443, 465, 587, 1024-65535.
	//
	// LoadBalancerPort is a required field
	LoadBalancerPort *int64 `type:"integer" required:"true"`

	// The load balancer transport protocol to use for routing: HTTP, HTTPS, TCP,
	// or SSL.
	//
	// Protocol is a required field
	Protocol *string `type:"string" required:"true"`

	// The Amazon Resource Name (ARN) of the server certificate.
	SSLCertificateId *string `type:"string"`
	// contains filtered or unexported fields
}

Information about a listener.

For information about the protocols and the ports supported by Elastic Load Balancing, see Listeners for Your Classic Load Balancer (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-listener-config.html) in the Classic Load Balancers Guide.

func (Listener) String

func (s Listener) String() string

String returns the string representation

func (*Listener) Validate

func (s *Listener) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type ListenerDescription

type ListenerDescription struct {

	// The listener.
	Listener *Listener `type:"structure"`

	// The policies. If there are no policies enabled, the list is empty.
	PolicyNames []string `type:"list"`
	// contains filtered or unexported fields
}

The policies enabled for a listener.

func (ListenerDescription) String

func (s ListenerDescription) String() string

String returns the string representation

type LoadBalancerAttributes

type LoadBalancerAttributes struct {

	// If enabled, the load balancer captures detailed information of all requests
	// and delivers the information to the Amazon S3 bucket that you specify.
	//
	// For more information, see Enable Access Logs (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/enable-access-logs.html)
	// in the Classic Load Balancers Guide.
	AccessLog *AccessLog `type:"structure"`

	// This parameter is reserved.
	AdditionalAttributes []AdditionalAttribute `type:"list"`

	// If enabled, the load balancer allows existing requests to complete before
	// the load balancer shifts traffic away from a deregistered or unhealthy instance.
	//
	// For more information, see Configure Connection Draining (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/config-conn-drain.html)
	// in the Classic Load Balancers Guide.
	ConnectionDraining *ConnectionDraining `type:"structure"`

	// If enabled, the load balancer allows the connections to remain idle (no data
	// is sent over the connection) for the specified duration.
	//
	// By default, Elastic Load Balancing maintains a 60-second idle connection
	// timeout for both front-end and back-end connections of your load balancer.
	// For more information, see Configure Idle Connection Timeout (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/config-idle-timeout.html)
	// in the Classic Load Balancers Guide.
	ConnectionSettings *ConnectionSettings `type:"structure"`

	// If enabled, the load balancer routes the request traffic evenly across all
	// instances regardless of the Availability Zones.
	//
	// For more information, see Configure Cross-Zone Load Balancing (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/enable-disable-crosszone-lb.html)
	// in the Classic Load Balancers Guide.
	CrossZoneLoadBalancing *CrossZoneLoadBalancing `type:"structure"`
	// contains filtered or unexported fields
}

The attributes for a load balancer.

func (LoadBalancerAttributes) String

func (s LoadBalancerAttributes) String() string

String returns the string representation

func (*LoadBalancerAttributes) Validate

func (s *LoadBalancerAttributes) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type LoadBalancerDescription

type LoadBalancerDescription struct {

	// The Availability Zones for the load balancer.
	AvailabilityZones []string `type:"list"`

	// Information about your EC2 instances.
	BackendServerDescriptions []BackendServerDescription `type:"list"`

	// The DNS name of the load balancer.
	//
	// For more information, see Configure a Custom Domain Name (http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/using-domain-names-with-elb.html)
	// in the Classic Load Balancers Guide.
	CanonicalHostedZoneName *string `type:"string"`

	// The ID of the Amazon Route 53 hosted zone for the load balancer.
	CanonicalHostedZoneNameID *string `type:"string"`

	// The date and time the load balancer was created.
	CreatedTime *time.Time `type:"timestamp"`

	// The DNS name of the load balancer.
	DNSName *string `type:"string"`

	// Information about the health checks conducted on the load balancer.
	HealthCheck *HealthCheck `type:"structure"`

	// The IDs of the instances for the load balancer.
	Instances []Instance `type:"list"`

	// The listeners for the load balancer.
	ListenerDescriptions []ListenerDescription `type:"list"`

	// The name of the load balancer.
	LoadBalancerName *string `type:"string"`

	// The policies defined for the load balancer.
	Policies *Policies `type:"structure"`

	// The type of load balancer. Valid only for load balancers in a VPC.
	//
	// If Scheme is internet-facing, the load balancer has a public DNS name that
	// resolves to a public IP address.
	//
	// If Scheme is internal, the load balancer has a public DNS name that resolves
	// to a private IP address.
	Scheme *string `type:"string"`

	// The security groups for the load balancer. Valid only for load balancers
	// in a VPC.
	SecurityGroups []string `type:"list"`

	// The security group for the load balancer, which you can use as part of your
	// inbound rules for your registered instances. To only allow traffic from load
	// balancers, add a security group rule that specifies this source security
	// group as the inbound source.
	SourceSecurityGroup *SourceSecurityGroup `type:"structure"`

	// The IDs of the subnets for the load balancer.
	Subnets []string `type:"list"`

	// The ID of the VPC for the load balancer.
	VPCId *string `type:"string"`
	// contains filtered or unexported fields
}

Information about a load balancer.

func (LoadBalancerDescription) String

func (s LoadBalancerDescription) String() string

String returns the string representation

type ModifyLoadBalancerAttributesInput

type ModifyLoadBalancerAttributesInput struct {

	// The attributes for the load balancer.
	//
	// LoadBalancerAttributes is a required field
	LoadBalancerAttributes *LoadBalancerAttributes `type:"structure" required:"true"`

	// The name of the load balancer.
	//
	// LoadBalancerName is a required field
	LoadBalancerName *string `type:"string" required:"true"`
	// contains filtered or unexported fields
}

Contains the parameters for ModifyLoadBalancerAttributes.

func (ModifyLoadBalancerAttributesInput) String

String returns the string representation

func (*ModifyLoadBalancerAttributesInput) Validate

Validate inspects the fields of the type to determine if they are valid.

type ModifyLoadBalancerAttributesOutput

type ModifyLoadBalancerAttributesOutput struct {

	// Information about the load balancer attributes.
	LoadBalancerAttributes *LoadBalancerAttributes `type:"structure"`

	// The name of the load balancer.
	LoadBalancerName *string `type:"string"`
	// contains filtered or unexported fields
}

Contains the output of ModifyLoadBalancerAttributes.

func (ModifyLoadBalancerAttributesOutput) String

String returns the string representation

type ModifyLoadBalancerAttributesRequest

type ModifyLoadBalancerAttributesRequest struct {
	*aws.Request
	Input *ModifyLoadBalancerAttributesInput
	Copy  func(*ModifyLoadBalancerAttributesInput) ModifyLoadBalancerAttributesRequest
}

ModifyLoadBalancerAttributesRequest is the request type for the ModifyLoadBalancerAttributes API operation.

func (ModifyLoadBalancerAttributesRequest) Send

Send marshals and sends the ModifyLoadBalancerAttributes API request.

type ModifyLoadBalancerAttributesResponse

type ModifyLoadBalancerAttributesResponse struct {
	*ModifyLoadBalancerAttributesOutput
	// contains filtered or unexported fields
}

ModifyLoadBalancerAttributesResponse is the response type for the ModifyLoadBalancerAttributes API operation.

func (*ModifyLoadBalancerAttributesResponse) SDKResponseMetdata

func (r *ModifyLoadBalancerAttributesResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the ModifyLoadBalancerAttributes request.

type Policies

type Policies struct {

	// The stickiness policies created using CreateAppCookieStickinessPolicy.
	AppCookieStickinessPolicies []AppCookieStickinessPolicy `type:"list"`

	// The stickiness policies created using CreateLBCookieStickinessPolicy.
	LBCookieStickinessPolicies []LBCookieStickinessPolicy `type:"list"`

	// The policies other than the stickiness policies.
	OtherPolicies []string `type:"list"`
	// contains filtered or unexported fields
}

The policies for a load balancer.

func (Policies) String

func (s Policies) String() string

String returns the string representation

type PolicyAttribute

type PolicyAttribute struct {

	// The name of the attribute.
	AttributeName *string `type:"string"`

	// The value of the attribute.
	AttributeValue *string `type:"string"`
	// contains filtered or unexported fields
}

Information about a policy attribute.

func (PolicyAttribute) String

func (s PolicyAttribute) String() string

String returns the string representation

type PolicyAttributeDescription

type PolicyAttributeDescription struct {

	// The name of the attribute.
	AttributeName *string `type:"string"`

	// The value of the attribute.
	AttributeValue *string `type:"string"`
	// contains filtered or unexported fields
}

Information about a policy attribute.

func (PolicyAttributeDescription) String

String returns the string representation

type PolicyAttributeTypeDescription

type PolicyAttributeTypeDescription struct {

	// The name of the attribute.
	AttributeName *string `type:"string"`

	// The type of the attribute. For example, Boolean or Integer.
	AttributeType *string `type:"string"`

	// The cardinality of the attribute.
	//
	// Valid values:
	//
	//    * ONE(1) : Single value required
	//
	//    * ZERO_OR_ONE(0..1) : Up to one value is allowed
	//
	//    * ZERO_OR_MORE(0..*) : Optional. Multiple values are allowed
	//
	//    * ONE_OR_MORE(1..*0) : Required. Multiple values are allowed
	Cardinality *string `type:"string"`

	// The default value of the attribute, if applicable.
	DefaultValue *string `type:"string"`

	// A description of the attribute.
	Description *string `type:"string"`
	// contains filtered or unexported fields
}

Information about a policy attribute type.

func (PolicyAttributeTypeDescription) String

String returns the string representation

type PolicyDescription

type PolicyDescription struct {

	// The policy attributes.
	PolicyAttributeDescriptions []PolicyAttributeDescription `type:"list"`

	// The name of the policy.
	PolicyName *string `type:"string"`

	// The name of the policy type.
	PolicyTypeName *string `type:"string"`
	// contains filtered or unexported fields
}

Information about a policy.

func (PolicyDescription) String

func (s PolicyDescription) String() string

String returns the string representation

type PolicyTypeDescription

type PolicyTypeDescription struct {

	// A description of the policy type.
	Description *string `type:"string"`

	// The description of the policy attributes associated with the policies defined
	// by Elastic Load Balancing.
	PolicyAttributeTypeDescriptions []PolicyAttributeTypeDescription `type:"list"`

	// The name of the policy type.
	PolicyTypeName *string `type:"string"`
	// contains filtered or unexported fields
}

Information about a policy type.

func (PolicyTypeDescription) String

func (s PolicyTypeDescription) String() string

String returns the string representation

type RegisterInstancesWithLoadBalancerInput

type RegisterInstancesWithLoadBalancerInput struct {

	// The IDs of the instances.
	//
	// Instances is a required field
	Instances []Instance `type:"list" required:"true"`

	// The name of the load balancer.
	//
	// LoadBalancerName is a required field
	LoadBalancerName *string `type:"string" required:"true"`
	// contains filtered or unexported fields
}

Contains the parameters for RegisterInstancesWithLoadBalancer.

func (RegisterInstancesWithLoadBalancerInput) String

String returns the string representation

func (*RegisterInstancesWithLoadBalancerInput) Validate

Validate inspects the fields of the type to determine if they are valid.

type RegisterInstancesWithLoadBalancerOutput

type RegisterInstancesWithLoadBalancerOutput struct {

	// The updated list of instances for the load balancer.
	Instances []Instance `type:"list"`
	// contains filtered or unexported fields
}

Contains the output of RegisterInstancesWithLoadBalancer.

func (RegisterInstancesWithLoadBalancerOutput) String

String returns the string representation

type RegisterInstancesWithLoadBalancerRequest

RegisterInstancesWithLoadBalancerRequest is the request type for the RegisterInstancesWithLoadBalancer API operation.

func (RegisterInstancesWithLoadBalancerRequest) Send

Send marshals and sends the RegisterInstancesWithLoadBalancer API request.

type RegisterInstancesWithLoadBalancerResponse

type RegisterInstancesWithLoadBalancerResponse struct {
	*RegisterInstancesWithLoadBalancerOutput
	// contains filtered or unexported fields
}

RegisterInstancesWithLoadBalancerResponse is the response type for the RegisterInstancesWithLoadBalancer API operation.

func (*RegisterInstancesWithLoadBalancerResponse) SDKResponseMetdata

func (r *RegisterInstancesWithLoadBalancerResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the RegisterInstancesWithLoadBalancer request.

type RemoveTagsInput

type RemoveTagsInput struct {

	// The name of the load balancer. You can specify a maximum of one load balancer
	// name.
	//
	// LoadBalancerNames is a required field
	LoadBalancerNames []string `type:"list" required:"true"`

	// The list of tag keys to remove.
	//
	// Tags is a required field
	Tags []TagKeyOnly `min:"1" type:"list" required:"true"`
	// contains filtered or unexported fields
}

Contains the parameters for RemoveTags.

func (RemoveTagsInput) String

func (s RemoveTagsInput) String() string

String returns the string representation

func (*RemoveTagsInput) Validate

func (s *RemoveTagsInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type RemoveTagsOutput

type RemoveTagsOutput struct {
	// contains filtered or unexported fields
}

Contains the output of RemoveTags.

func (RemoveTagsOutput) String

func (s RemoveTagsOutput) String() string

String returns the string representation

type RemoveTagsRequest

type RemoveTagsRequest struct {
	*aws.Request
	Input *RemoveTagsInput
	Copy  func(*RemoveTagsInput) RemoveTagsRequest
}

RemoveTagsRequest is the request type for the RemoveTags API operation.

func (RemoveTagsRequest) Send

Send marshals and sends the RemoveTags API request.

type RemoveTagsResponse

type RemoveTagsResponse struct {
	*RemoveTagsOutput
	// contains filtered or unexported fields
}

RemoveTagsResponse is the response type for the RemoveTags API operation.

func (*RemoveTagsResponse) SDKResponseMetdata

func (r *RemoveTagsResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the RemoveTags request.

type SetLoadBalancerListenerSSLCertificateInput

type SetLoadBalancerListenerSSLCertificateInput struct {

	// The name of the load balancer.
	//
	// LoadBalancerName is a required field
	LoadBalancerName *string `type:"string" required:"true"`

	// The port that uses the specified SSL certificate.
	//
	// LoadBalancerPort is a required field
	LoadBalancerPort *int64 `type:"integer" required:"true"`

	// The Amazon Resource Name (ARN) of the SSL certificate.
	//
	// SSLCertificateId is a required field
	SSLCertificateId *string `type:"string" required:"true"`
	// contains filtered or unexported fields
}

Contains the parameters for SetLoadBalancerListenerSSLCertificate.

func (SetLoadBalancerListenerSSLCertificateInput) String

String returns the string representation

func (*SetLoadBalancerListenerSSLCertificateInput) Validate

Validate inspects the fields of the type to determine if they are valid.

type SetLoadBalancerListenerSSLCertificateOutput

type SetLoadBalancerListenerSSLCertificateOutput struct {
	// contains filtered or unexported fields
}

Contains the output of SetLoadBalancerListenerSSLCertificate.

func (SetLoadBalancerListenerSSLCertificateOutput) String

String returns the string representation

type SetLoadBalancerListenerSSLCertificateRequest

SetLoadBalancerListenerSSLCertificateRequest is the request type for the SetLoadBalancerListenerSSLCertificate API operation.

func (SetLoadBalancerListenerSSLCertificateRequest) Send

Send marshals and sends the SetLoadBalancerListenerSSLCertificate API request.

type SetLoadBalancerListenerSSLCertificateResponse

type SetLoadBalancerListenerSSLCertificateResponse struct {
	*SetLoadBalancerListenerSSLCertificateOutput
	// contains filtered or unexported fields
}

SetLoadBalancerListenerSSLCertificateResponse is the response type for the SetLoadBalancerListenerSSLCertificate API operation.

func (*SetLoadBalancerListenerSSLCertificateResponse) SDKResponseMetdata

SDKResponseMetdata returns the response metadata for the SetLoadBalancerListenerSSLCertificate request.

type SetLoadBalancerPoliciesForBackendServerInput

type SetLoadBalancerPoliciesForBackendServerInput struct {

	// The port number associated with the EC2 instance.
	//
	// InstancePort is a required field
	InstancePort *int64 `type:"integer" required:"true"`

	// The name of the load balancer.
	//
	// LoadBalancerName is a required field
	LoadBalancerName *string `type:"string" required:"true"`

	// The names of the policies. If the list is empty, then all current polices
	// are removed from the EC2 instance.
	//
	// PolicyNames is a required field
	PolicyNames []string `type:"list" required:"true"`
	// contains filtered or unexported fields
}

Contains the parameters for SetLoadBalancerPoliciesForBackendServer.

func (SetLoadBalancerPoliciesForBackendServerInput) String

String returns the string representation

func (*SetLoadBalancerPoliciesForBackendServerInput) Validate

Validate inspects the fields of the type to determine if they are valid.

type SetLoadBalancerPoliciesForBackendServerOutput

type SetLoadBalancerPoliciesForBackendServerOutput struct {
	// contains filtered or unexported fields
}

Contains the output of SetLoadBalancerPoliciesForBackendServer.

func (SetLoadBalancerPoliciesForBackendServerOutput) String

String returns the string representation

type SetLoadBalancerPoliciesForBackendServerRequest

SetLoadBalancerPoliciesForBackendServerRequest is the request type for the SetLoadBalancerPoliciesForBackendServer API operation.

func (SetLoadBalancerPoliciesForBackendServerRequest) Send

Send marshals and sends the SetLoadBalancerPoliciesForBackendServer API request.

type SetLoadBalancerPoliciesForBackendServerResponse

type SetLoadBalancerPoliciesForBackendServerResponse struct {
	*SetLoadBalancerPoliciesForBackendServerOutput
	// contains filtered or unexported fields
}

SetLoadBalancerPoliciesForBackendServerResponse is the response type for the SetLoadBalancerPoliciesForBackendServer API operation.

func (*SetLoadBalancerPoliciesForBackendServerResponse) SDKResponseMetdata

SDKResponseMetdata returns the response metadata for the SetLoadBalancerPoliciesForBackendServer request.

type SetLoadBalancerPoliciesOfListenerInput

type SetLoadBalancerPoliciesOfListenerInput struct {

	// The name of the load balancer.
	//
	// LoadBalancerName is a required field
	LoadBalancerName *string `type:"string" required:"true"`

	// The external port of the load balancer.
	//
	// LoadBalancerPort is a required field
	LoadBalancerPort *int64 `type:"integer" required:"true"`

	// The names of the policies. This list must include all policies to be enabled.
	// If you omit a policy that is currently enabled, it is disabled. If the list
	// is empty, all current policies are disabled.
	//
	// PolicyNames is a required field
	PolicyNames []string `type:"list" required:"true"`
	// contains filtered or unexported fields
}

Contains the parameters for SetLoadBalancePoliciesOfListener.

func (SetLoadBalancerPoliciesOfListenerInput) String

String returns the string representation

func (*SetLoadBalancerPoliciesOfListenerInput) Validate

Validate inspects the fields of the type to determine if they are valid.

type SetLoadBalancerPoliciesOfListenerOutput

type SetLoadBalancerPoliciesOfListenerOutput struct {
	// contains filtered or unexported fields
}

Contains the output of SetLoadBalancePoliciesOfListener.

func (SetLoadBalancerPoliciesOfListenerOutput) String

String returns the string representation

type SetLoadBalancerPoliciesOfListenerRequest

SetLoadBalancerPoliciesOfListenerRequest is the request type for the SetLoadBalancerPoliciesOfListener API operation.

func (SetLoadBalancerPoliciesOfListenerRequest) Send

Send marshals and sends the SetLoadBalancerPoliciesOfListener API request.

type SetLoadBalancerPoliciesOfListenerResponse

type SetLoadBalancerPoliciesOfListenerResponse struct {
	*SetLoadBalancerPoliciesOfListenerOutput
	// contains filtered or unexported fields
}

SetLoadBalancerPoliciesOfListenerResponse is the response type for the SetLoadBalancerPoliciesOfListener API operation.

func (*SetLoadBalancerPoliciesOfListenerResponse) SDKResponseMetdata

func (r *SetLoadBalancerPoliciesOfListenerResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the SetLoadBalancerPoliciesOfListener request.

type SourceSecurityGroup

type SourceSecurityGroup struct {

	// The name of the security group.
	GroupName *string `type:"string"`

	// The owner of the security group.
	OwnerAlias *string `type:"string"`
	// contains filtered or unexported fields
}

Information about a source security group.

func (SourceSecurityGroup) String

func (s SourceSecurityGroup) String() string

String returns the string representation

type Tag

type Tag struct {

	// The key of the tag.
	//
	// Key is a required field
	Key *string `min:"1" type:"string" required:"true"`

	// The value of the tag.
	Value *string `type:"string"`
	// contains filtered or unexported fields
}

Information about a tag.

func (Tag) String

func (s Tag) String() string

String returns the string representation

func (*Tag) Validate

func (s *Tag) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type TagDescription

type TagDescription struct {

	// The name of the load balancer.
	LoadBalancerName *string `type:"string"`

	// The tags.
	Tags []Tag `min:"1" type:"list"`
	// contains filtered or unexported fields
}

The tags associated with a load balancer.

func (TagDescription) String

func (s TagDescription) String() string

String returns the string representation

type TagKeyOnly

type TagKeyOnly struct {

	// The name of the key.
	Key *string `min:"1" type:"string"`
	// contains filtered or unexported fields
}

The key of a tag.

func (TagKeyOnly) String

func (s TagKeyOnly) String() string

String returns the string representation

func (*TagKeyOnly) Validate

func (s *TagKeyOnly) Validate() error

Validate inspects the fields of the type to determine if they are valid.

Directories

Path Synopsis
Package elasticloadbalancingiface provides an interface to enable mocking the Elastic Load Balancing service client for testing your code.
Package elasticloadbalancingiface provides an interface to enable mocking the Elastic Load Balancing service client for testing your code.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL