Documentation ¶
Index ¶
- func Accelerator_IsConstruct(x interface{}) *bool
- func Accelerator_IsOwnedResource(construct constructs.IConstruct) *bool
- func Accelerator_IsResource(construct constructs.IConstruct) *bool
- func CfnAccelerator_CFN_RESOURCE_TYPE_NAME() *string
- func CfnAccelerator_IsCfnElement(x interface{}) *bool
- func CfnAccelerator_IsCfnResource(construct constructs.IConstruct) *bool
- func CfnAccelerator_IsConstruct(x interface{}) *bool
- func CfnEndpointGroup_CFN_RESOURCE_TYPE_NAME() *string
- func CfnEndpointGroup_IsCfnElement(x interface{}) *bool
- func CfnEndpointGroup_IsCfnResource(construct constructs.IConstruct) *bool
- func CfnEndpointGroup_IsConstruct(x interface{}) *bool
- func CfnListener_CFN_RESOURCE_TYPE_NAME() *string
- func CfnListener_IsCfnElement(x interface{}) *bool
- func CfnListener_IsCfnResource(construct constructs.IConstruct) *bool
- func CfnListener_IsConstruct(x interface{}) *bool
- func EndpointGroup_IsConstruct(x interface{}) *bool
- func EndpointGroup_IsOwnedResource(construct constructs.IConstruct) *bool
- func EndpointGroup_IsResource(construct constructs.IConstruct) *bool
- func Listener_IsConstruct(x interface{}) *bool
- func Listener_IsOwnedResource(construct constructs.IConstruct) *bool
- func Listener_IsResource(construct constructs.IConstruct) *bool
- func NewAccelerator_Override(a Accelerator, scope constructs.Construct, id *string, props *AcceleratorProps)
- func NewCfnAccelerator_Override(c CfnAccelerator, scope constructs.Construct, id *string, ...)
- func NewCfnEndpointGroup_Override(c CfnEndpointGroup, scope constructs.Construct, id *string, ...)
- func NewCfnListener_Override(c CfnListener, scope constructs.Construct, id *string, props *CfnListenerProps)
- func NewEndpointGroup_Override(e EndpointGroup, scope constructs.Construct, id *string, ...)
- func NewListener_Override(l Listener, scope constructs.Construct, id *string, props *ListenerProps)
- func NewRawEndpoint_Override(r RawEndpoint, props *RawEndpointProps)
- type Accelerator
- type AcceleratorAttributes
- type AcceleratorProps
- type CfnAccelerator
- type CfnAcceleratorProps
- type CfnEndpointGroup
- type CfnEndpointGroupProps
- type CfnEndpointGroup_EndpointConfigurationProperty
- type CfnEndpointGroup_PortOverrideProperty
- type CfnListener
- type CfnListenerProps
- type CfnListener_PortRangeProperty
- type ClientAffinity
- type ConnectionProtocol
- type EndpointGroup
- type EndpointGroupOptions
- type EndpointGroupProps
- type HealthCheckProtocol
- type IAccelerator
- type IEndpoint
- type IEndpointGroup
- type IListener
- type Listener
- type ListenerOptions
- type ListenerProps
- type PortOverride
- type PortRange
- type RawEndpoint
- type RawEndpointProps
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Accelerator_IsConstruct ¶
func Accelerator_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`.
func Accelerator_IsOwnedResource ¶ added in v2.32.0
func Accelerator_IsOwnedResource(construct constructs.IConstruct) *bool
Returns true if the construct was created by CDK, and false otherwise.
func Accelerator_IsResource ¶
func Accelerator_IsResource(construct constructs.IConstruct) *bool
Check whether the given construct is a Resource.
func CfnAccelerator_CFN_RESOURCE_TYPE_NAME ¶
func CfnAccelerator_CFN_RESOURCE_TYPE_NAME() *string
func CfnAccelerator_IsCfnElement ¶
func CfnAccelerator_IsCfnElement(x interface{}) *bool
Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).
Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.
Returns: The construct as a stack element or undefined if it is not a stack element.
func CfnAccelerator_IsCfnResource ¶
func CfnAccelerator_IsCfnResource(construct constructs.IConstruct) *bool
Check whether the given construct is a CfnResource.
func CfnAccelerator_IsConstruct ¶
func CfnAccelerator_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`.
func CfnEndpointGroup_CFN_RESOURCE_TYPE_NAME ¶
func CfnEndpointGroup_CFN_RESOURCE_TYPE_NAME() *string
func CfnEndpointGroup_IsCfnElement ¶
func CfnEndpointGroup_IsCfnElement(x interface{}) *bool
Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).
Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.
Returns: The construct as a stack element or undefined if it is not a stack element.
func CfnEndpointGroup_IsCfnResource ¶
func CfnEndpointGroup_IsCfnResource(construct constructs.IConstruct) *bool
Check whether the given construct is a CfnResource.
func CfnEndpointGroup_IsConstruct ¶
func CfnEndpointGroup_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`.
func CfnListener_CFN_RESOURCE_TYPE_NAME ¶
func CfnListener_CFN_RESOURCE_TYPE_NAME() *string
func CfnListener_IsCfnElement ¶
func CfnListener_IsCfnElement(x interface{}) *bool
Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).
Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.
Returns: The construct as a stack element or undefined if it is not a stack element.
func CfnListener_IsCfnResource ¶
func CfnListener_IsCfnResource(construct constructs.IConstruct) *bool
Check whether the given construct is a CfnResource.
func CfnListener_IsConstruct ¶
func CfnListener_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`.
func EndpointGroup_IsConstruct ¶
func EndpointGroup_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`.
func EndpointGroup_IsOwnedResource ¶ added in v2.32.0
func EndpointGroup_IsOwnedResource(construct constructs.IConstruct) *bool
Returns true if the construct was created by CDK, and false otherwise.
func EndpointGroup_IsResource ¶
func EndpointGroup_IsResource(construct constructs.IConstruct) *bool
Check whether the given construct is a Resource.
func Listener_IsConstruct ¶
func Listener_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`.
func Listener_IsOwnedResource ¶ added in v2.32.0
func Listener_IsOwnedResource(construct constructs.IConstruct) *bool
Returns true if the construct was created by CDK, and false otherwise.
func Listener_IsResource ¶
func Listener_IsResource(construct constructs.IConstruct) *bool
Check whether the given construct is a Resource.
func NewAccelerator_Override ¶
func NewAccelerator_Override(a Accelerator, scope constructs.Construct, id *string, props *AcceleratorProps)
func NewCfnAccelerator_Override ¶
func NewCfnAccelerator_Override(c CfnAccelerator, scope constructs.Construct, id *string, props *CfnAcceleratorProps)
Create a new `AWS::GlobalAccelerator::Accelerator`.
func NewCfnEndpointGroup_Override ¶
func NewCfnEndpointGroup_Override(c CfnEndpointGroup, scope constructs.Construct, id *string, props *CfnEndpointGroupProps)
Create a new `AWS::GlobalAccelerator::EndpointGroup`.
func NewCfnListener_Override ¶
func NewCfnListener_Override(c CfnListener, scope constructs.Construct, id *string, props *CfnListenerProps)
Create a new `AWS::GlobalAccelerator::Listener`.
func NewEndpointGroup_Override ¶
func NewEndpointGroup_Override(e EndpointGroup, scope constructs.Construct, id *string, props *EndpointGroupProps)
func NewListener_Override ¶
func NewListener_Override(l Listener, scope constructs.Construct, id *string, props *ListenerProps)
func NewRawEndpoint_Override ¶
func NewRawEndpoint_Override(r RawEndpoint, props *RawEndpointProps)
Types ¶
type Accelerator ¶
type Accelerator interface { awscdk.Resource IAccelerator // The ARN of the accelerator. AcceleratorArn() *string // The Domain Name System (DNS) name that Global Accelerator creates that points to your accelerator's static IP addresses. DnsName() *string // The environment this resource belongs to. // // For resources that are created and managed by the CDK // (generally, those created by creating new class instances like Role, Bucket, etc.), // this is always the same as the environment of the stack they belong to; // however, for imported resources // (those obtained from static methods like fromRoleArn, fromBucketName, etc.), // that might be different than the stack they were imported into. Env() *awscdk.ResourceEnvironment // The tree node. Node() constructs.Node // Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource. // // This value will resolve to one of the following: // - a concrete value (e.g. `"my-awesome-bucket"`) // - `undefined`, when a name should be generated by CloudFormation // - a concrete name generated automatically during synthesis, in // cross-environment scenarios. PhysicalName() *string // The stack in which this resource is defined. Stack() awscdk.Stack // Add a listener to the accelerator. AddListener(id *string, options *ListenerOptions) Listener // Apply the given removal policy to this resource. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). ApplyRemovalPolicy(policy awscdk.RemovalPolicy) GeneratePhysicalName() *string // Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`). // // Normally, this token will resolve to `arnAttr`, but if the resource is // referenced across environments, `arnComponents` will be used to synthesize // a concrete ARN with the resource's physical name. Make sure to reference // `this.physicalName` in `arnComponents`. GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string // Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`). // // Normally, this token will resolve to `nameAttr`, but if the resource is // referenced across environments, it will be resolved to `this.physicalName`, // which will be a concrete name. GetResourceNameAttribute(nameAttr *string) *string // Returns a string representation of this construct. ToString() *string }
The Accelerator construct.
Example:
// Create an Accelerator accelerator := globalaccelerator.NewAccelerator(this, jsii.String("Accelerator")) // Create a Listener listener := accelerator.addListener(jsii.String("Listener"), &listenerOptions{ portRanges: []portRange{ &portRange{ fromPort: jsii.Number(80), }, &portRange{ fromPort: jsii.Number(443), }, }, }) // Import the Load Balancers nlb1 := elbv2.networkLoadBalancer.fromNetworkLoadBalancerAttributes(this, jsii.String("NLB1"), &networkLoadBalancerAttributes{ loadBalancerArn: jsii.String("arn:aws:elasticloadbalancing:us-west-2:111111111111:loadbalancer/app/my-load-balancer1/e16bef66805b"), }) nlb2 := elbv2.networkLoadBalancer.fromNetworkLoadBalancerAttributes(this, jsii.String("NLB2"), &networkLoadBalancerAttributes{ loadBalancerArn: jsii.String("arn:aws:elasticloadbalancing:ap-south-1:111111111111:loadbalancer/app/my-load-balancer2/5513dc2ea8a1"), }) // Add one EndpointGroup for each Region we are targeting listener.addEndpointGroup(jsii.String("Group1"), &endpointGroupOptions{ endpoints: []iEndpoint{ ga_endpoints.NewNetworkLoadBalancerEndpoint(nlb1), }, }) listener.addEndpointGroup(jsii.String("Group2"), &endpointGroupOptions{ // Imported load balancers automatically calculate their Region from the ARN. // If you are load balancing to other resources, you must also pass a `region` // parameter here. endpoints: []*iEndpoint{ ga_endpoints.NewNetworkLoadBalancerEndpoint(nlb2), }, })
func NewAccelerator ¶
func NewAccelerator(scope constructs.Construct, id *string, props *AcceleratorProps) Accelerator
type AcceleratorAttributes ¶
type AcceleratorAttributes struct { // The ARN of the accelerator. AcceleratorArn *string `field:"required" json:"acceleratorArn" yaml:"acceleratorArn"` // The DNS name of the accelerator. DnsName *string `field:"required" json:"dnsName" yaml:"dnsName"` }
Attributes required to import an existing accelerator to the stack.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" acceleratorAttributes := &acceleratorAttributes{ acceleratorArn: jsii.String("acceleratorArn"), dnsName: jsii.String("dnsName"), }
type AcceleratorProps ¶
type AcceleratorProps struct { // The name of the accelerator. AcceleratorName *string `field:"optional" json:"acceleratorName" yaml:"acceleratorName"` // Indicates whether the accelerator is enabled. Enabled *bool `field:"optional" json:"enabled" yaml:"enabled"` }
Construct properties of the Accelerator.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" acceleratorProps := &acceleratorProps{ acceleratorName: jsii.String("acceleratorName"), enabled: jsii.Boolean(false), }
type CfnAccelerator ¶
type CfnAccelerator interface { awscdk.CfnResource awscdk.IInspectable // The ARN of the accelerator, such as `arn:aws:globalaccelerator::012345678901:accelerator/1234abcd-abcd-1234-abcd-1234abcdefgh` . AttrAcceleratorArn() *string // The Domain Name System (DNS) name that Global Accelerator creates that points to your accelerator's static IP addresses. AttrDnsName() *string AttrIpv4Addresses() *[]*string // Options for this resource, such as condition, update policy etc. CfnOptions() awscdk.ICfnResourceOptions CfnProperties() *map[string]interface{} // AWS resource type. CfnResourceType() *string // Returns: the stack trace of the point where this Resource was created from, sourced // from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most // node +internal+ entries filtered. CreationStack() *[]*string // Indicates whether the accelerator is enabled. The value is true or false. The default value is true. // // If the value is set to true, the accelerator cannot be deleted. If set to false, accelerator can be deleted. Enabled() interface{} SetEnabled(val interface{}) // Optionally, if you've added your own IP address pool to Global Accelerator (BYOIP), you can choose IP addresses from your own pool to use for the accelerator's static IP addresses when you create an accelerator. // // You can specify one or two addresses, separated by a comma. Do not include the /32 suffix. // // Only one IP address from each of your IP address ranges can be used for each accelerator. If you specify only one IP address from your IP address range, Global Accelerator assigns a second static IP address for the accelerator from the AWS IP address pool. // // Note that you can't update IP addresses for an existing accelerator. To change them, you must create a new accelerator with the new addresses. // // For more information, see [Bring Your Own IP Addresses (BYOIP)](https://docs.aws.amazon.com/global-accelerator/latest/dg/using-byoip.html) in the *AWS Global Accelerator Developer Guide* . IpAddresses() *[]*string SetIpAddresses(val *[]*string) // The value for the address type must be IPv4. IpAddressType() *string SetIpAddressType(val *string) // The logical ID for this CloudFormation stack element. // // The logical ID of the element // is calculated from the path of the resource node in the construct tree. // // To override this value, use `overrideLogicalId(newLogicalId)`. // // Returns: the logical ID as a stringified token. This value will only get // resolved during synthesis. LogicalId() *string // The name of the accelerator. // // The name must contain only alphanumeric characters or hyphens (-), and must not begin or end with a hyphen. Name() *string SetName(val *string) // The tree node. Node() constructs.Node // Return a string that will be resolved to a CloudFormation `{ Ref }` for this element. // // If, by any chance, the intrinsic reference of a resource is not a string, you could // coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`. Ref() *string // The stack in which this element is defined. // // CfnElements must be defined within a stack scope (directly or indirectly). Stack() awscdk.Stack // Create tags for an accelerator. // // For more information, see [Tagging](https://docs.aws.amazon.com/global-accelerator/latest/dg/tagging-in-global-accelerator.html) in the *AWS Global Accelerator Developer Guide* . Tags() awscdk.TagManager // Deprecated. // Deprecated: use `updatedProperties` // // Return properties modified after initiation // // Resources that expose mutable properties should override this function to // collect and return the properties object for this resource. UpdatedProperites() *map[string]interface{} // Return properties modified after initiation. // // Resources that expose mutable properties should override this function to // collect and return the properties object for this resource. UpdatedProperties() *map[string]interface{} // Syntactic sugar for `addOverride(path, undefined)`. AddDeletionOverride(path *string) // Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. // // This can be used for resources across stacks (or nested stack) boundaries // and the dependency will automatically be transferred to the relevant scope. AddDependsOn(target awscdk.CfnResource) // Add a value to the CloudFormation Resource Metadata. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html // // Note that this is a different set of metadata from CDK node metadata; this // metadata ends up in the stack template under the resource, whereas CDK // node metadata ends up in the Cloud Assembly. // AddMetadata(key *string, value interface{}) // Adds an override to the synthesized CloudFormation resource. // // To add a // property override, either use `addPropertyOverride` or prefix `path` with // "Properties." (i.e. `Properties.TopicName`). // // If the override is nested, separate each nested level using a dot (.) in the path parameter. // If there is an array as part of the nesting, specify the index in the path. // // To include a literal `.` in the property name, prefix with a `\`. In most // programming languages you will need to write this as `"\\."` because the // `\` itself will need to be escaped. // // For example, // “`typescript // cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']); // cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE'); // “` // would add the overrides // “`json // "Properties": { // "GlobalSecondaryIndexes": [ // { // "Projection": { // "NonKeyAttributes": [ "myattribute" ] // ... // } // ... // }, // { // "ProjectionType": "INCLUDE" // ... // }, // ] // ... // } // “` // // The `value` argument to `addOverride` will not be processed or translated // in any way. Pass raw JSON values in here with the correct capitalization // for CloudFormation. If you pass CDK classes or structs, they will be // rendered with lowercased key names, and CloudFormation will reject the // template. AddOverride(path *string, value interface{}) // Adds an override that deletes the value of a property from the resource definition. AddPropertyDeletionOverride(propertyPath *string) // Adds an override to a resource property. // // Syntactic sugar for `addOverride("Properties.<...>", value)`. AddPropertyOverride(propertyPath *string, value interface{}) // Sets the deletion policy of the resource based on the removal policy specified. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). In some // cases, a snapshot can be taken of the resource prior to deletion // (`RemovalPolicy.SNAPSHOT`). A list of resources that support this policy // can be found in the following link:. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html#aws-attribute-deletionpolicy-options // ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions) // Returns a token for an runtime attribute of this resource. // // Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility // in case there is no generated attribute. GetAtt(attributeName *string) awscdk.Reference // Retrieve a value value from the CloudFormation Resource Metadata. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html // // Note that this is a different set of metadata from CDK node metadata; this // metadata ends up in the stack template under the resource, whereas CDK // node metadata ends up in the Cloud Assembly. // GetMetadata(key *string) interface{} // Examines the CloudFormation resource and discloses attributes. Inspect(inspector awscdk.TreeInspector) // Overrides the auto-generated logical ID with a specific ID. OverrideLogicalId(newLogicalId *string) RenderProperties(props *map[string]interface{}) *map[string]interface{} // Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template. // // Returns: `true` if the resource should be included or `false` is the resource // should be omitted. ShouldSynthesize() *bool // Returns a string representation of this construct. // // Returns: a string representation of this resource. ToString() *string ValidateProperties(_properties interface{}) }
A CloudFormation `AWS::GlobalAccelerator::Accelerator`.
The `AWS::GlobalAccelerator::Accelerator` resource is a Global Accelerator resource type that contains information about how you create an accelerator. An accelerator includes one or more listeners that process inbound connections and direct traffic to one or more endpoint groups, each of which includes endpoints, such as Application Load Balancers, Network Load Balancers, and Amazon EC2 instances.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" cfnAccelerator := awscdk.Aws_globalaccelerator.NewCfnAccelerator(this, jsii.String("MyCfnAccelerator"), &cfnAcceleratorProps{ name: jsii.String("name"), // the properties below are optional enabled: jsii.Boolean(false), ipAddresses: []*string{ jsii.String("ipAddresses"), }, ipAddressType: jsii.String("ipAddressType"), tags: []cfnTag{ &cfnTag{ key: jsii.String("key"), value: jsii.String("value"), }, }, })
func NewCfnAccelerator ¶
func NewCfnAccelerator(scope constructs.Construct, id *string, props *CfnAcceleratorProps) CfnAccelerator
Create a new `AWS::GlobalAccelerator::Accelerator`.
type CfnAcceleratorProps ¶
type CfnAcceleratorProps struct { // The name of the accelerator. // // The name must contain only alphanumeric characters or hyphens (-), and must not begin or end with a hyphen. Name *string `field:"required" json:"name" yaml:"name"` // Indicates whether the accelerator is enabled. The value is true or false. The default value is true. // // If the value is set to true, the accelerator cannot be deleted. If set to false, accelerator can be deleted. Enabled interface{} `field:"optional" json:"enabled" yaml:"enabled"` // Optionally, if you've added your own IP address pool to Global Accelerator (BYOIP), you can choose IP addresses from your own pool to use for the accelerator's static IP addresses when you create an accelerator. // // You can specify one or two addresses, separated by a comma. Do not include the /32 suffix. // // Only one IP address from each of your IP address ranges can be used for each accelerator. If you specify only one IP address from your IP address range, Global Accelerator assigns a second static IP address for the accelerator from the AWS IP address pool. // // Note that you can't update IP addresses for an existing accelerator. To change them, you must create a new accelerator with the new addresses. // // For more information, see [Bring Your Own IP Addresses (BYOIP)](https://docs.aws.amazon.com/global-accelerator/latest/dg/using-byoip.html) in the *AWS Global Accelerator Developer Guide* . IpAddresses *[]*string `field:"optional" json:"ipAddresses" yaml:"ipAddresses"` // The value for the address type must be IPv4. IpAddressType *string `field:"optional" json:"ipAddressType" yaml:"ipAddressType"` // Create tags for an accelerator. // // For more information, see [Tagging](https://docs.aws.amazon.com/global-accelerator/latest/dg/tagging-in-global-accelerator.html) in the *AWS Global Accelerator Developer Guide* . Tags *[]*awscdk.CfnTag `field:"optional" json:"tags" yaml:"tags"` }
Properties for defining a `CfnAccelerator`.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" cfnAcceleratorProps := &cfnAcceleratorProps{ name: jsii.String("name"), // the properties below are optional enabled: jsii.Boolean(false), ipAddresses: []*string{ jsii.String("ipAddresses"), }, ipAddressType: jsii.String("ipAddressType"), tags: []cfnTag{ &cfnTag{ key: jsii.String("key"), value: jsii.String("value"), }, }, }
type CfnEndpointGroup ¶
type CfnEndpointGroup interface { awscdk.CfnResource awscdk.IInspectable // The ARN of the endpoint group, such as `arn:aws:globalaccelerator::012345678901:accelerator/1234abcd-abcd-1234-abcd-1234abcdefgh/listener/0123vxyz/endpoint-group/098765zyxwvu` . AttrEndpointGroupArn() *string // Options for this resource, such as condition, update policy etc. CfnOptions() awscdk.ICfnResourceOptions CfnProperties() *map[string]interface{} // AWS resource type. CfnResourceType() *string // Returns: the stack trace of the point where this Resource was created from, sourced // from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most // node +internal+ entries filtered. CreationStack() *[]*string // The list of endpoint objects. EndpointConfigurations() interface{} SetEndpointConfigurations(val interface{}) // The AWS Regions where the endpoint group is located. EndpointGroupRegion() *string SetEndpointGroupRegion(val *string) // The time—10 seconds or 30 seconds—between health checks for each endpoint. // // The default value is 30. HealthCheckIntervalSeconds() *float64 SetHealthCheckIntervalSeconds(val *float64) // If the protocol is HTTP/S, then this value provides the ping path that Global Accelerator uses for the destination on the endpoints for health checks. // // The default is slash (/). HealthCheckPath() *string SetHealthCheckPath(val *string) // The port that Global Accelerator uses to perform health checks on endpoints that are part of this endpoint group. // // The default port is the port for the listener that this endpoint group is associated with. If the listener port is a list, Global Accelerator uses the first specified port in the list of ports. HealthCheckPort() *float64 SetHealthCheckPort(val *float64) // The protocol that Global Accelerator uses to perform health checks on endpoints that are part of this endpoint group. // // The default value is TCP. HealthCheckProtocol() *string SetHealthCheckProtocol(val *string) // The Amazon Resource Name (ARN) of the listener. ListenerArn() *string SetListenerArn(val *string) // The logical ID for this CloudFormation stack element. // // The logical ID of the element // is calculated from the path of the resource node in the construct tree. // // To override this value, use `overrideLogicalId(newLogicalId)`. // // Returns: the logical ID as a stringified token. This value will only get // resolved during synthesis. LogicalId() *string // The tree node. Node() constructs.Node // Allows you to override the destination ports used to route traffic to an endpoint. // // Using a port override lets you to map a list of external destination ports (that your users send traffic to) to a list of internal destination ports that you want an application endpoint to receive traffic on. PortOverrides() interface{} SetPortOverrides(val interface{}) // Return a string that will be resolved to a CloudFormation `{ Ref }` for this element. // // If, by any chance, the intrinsic reference of a resource is not a string, you could // coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`. Ref() *string // The stack in which this element is defined. // // CfnElements must be defined within a stack scope (directly or indirectly). Stack() awscdk.Stack // The number of consecutive health checks required to set the state of a healthy endpoint to unhealthy, or to set an unhealthy endpoint to healthy. // // The default value is 3. ThresholdCount() *float64 SetThresholdCount(val *float64) // The percentage of traffic to send to an AWS Regions . // // Additional traffic is distributed to other endpoint groups for this listener. // // Use this action to increase (dial up) or decrease (dial down) traffic to a specific Region. The percentage is applied to the traffic that would otherwise have been routed to the Region based on optimal routing. // // The default value is 100. TrafficDialPercentage() *float64 SetTrafficDialPercentage(val *float64) // Deprecated. // Deprecated: use `updatedProperties` // // Return properties modified after initiation // // Resources that expose mutable properties should override this function to // collect and return the properties object for this resource. UpdatedProperites() *map[string]interface{} // Return properties modified after initiation. // // Resources that expose mutable properties should override this function to // collect and return the properties object for this resource. UpdatedProperties() *map[string]interface{} // Syntactic sugar for `addOverride(path, undefined)`. AddDeletionOverride(path *string) // Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. // // This can be used for resources across stacks (or nested stack) boundaries // and the dependency will automatically be transferred to the relevant scope. AddDependsOn(target awscdk.CfnResource) // Add a value to the CloudFormation Resource Metadata. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html // // Note that this is a different set of metadata from CDK node metadata; this // metadata ends up in the stack template under the resource, whereas CDK // node metadata ends up in the Cloud Assembly. // AddMetadata(key *string, value interface{}) // Adds an override to the synthesized CloudFormation resource. // // To add a // property override, either use `addPropertyOverride` or prefix `path` with // "Properties." (i.e. `Properties.TopicName`). // // If the override is nested, separate each nested level using a dot (.) in the path parameter. // If there is an array as part of the nesting, specify the index in the path. // // To include a literal `.` in the property name, prefix with a `\`. In most // programming languages you will need to write this as `"\\."` because the // `\` itself will need to be escaped. // // For example, // “`typescript // cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']); // cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE'); // “` // would add the overrides // “`json // "Properties": { // "GlobalSecondaryIndexes": [ // { // "Projection": { // "NonKeyAttributes": [ "myattribute" ] // ... // } // ... // }, // { // "ProjectionType": "INCLUDE" // ... // }, // ] // ... // } // “` // // The `value` argument to `addOverride` will not be processed or translated // in any way. Pass raw JSON values in here with the correct capitalization // for CloudFormation. If you pass CDK classes or structs, they will be // rendered with lowercased key names, and CloudFormation will reject the // template. AddOverride(path *string, value interface{}) // Adds an override that deletes the value of a property from the resource definition. AddPropertyDeletionOverride(propertyPath *string) // Adds an override to a resource property. // // Syntactic sugar for `addOverride("Properties.<...>", value)`. AddPropertyOverride(propertyPath *string, value interface{}) // Sets the deletion policy of the resource based on the removal policy specified. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). In some // cases, a snapshot can be taken of the resource prior to deletion // (`RemovalPolicy.SNAPSHOT`). A list of resources that support this policy // can be found in the following link:. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html#aws-attribute-deletionpolicy-options // ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions) // Returns a token for an runtime attribute of this resource. // // Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility // in case there is no generated attribute. GetAtt(attributeName *string) awscdk.Reference // Retrieve a value value from the CloudFormation Resource Metadata. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html // // Note that this is a different set of metadata from CDK node metadata; this // metadata ends up in the stack template under the resource, whereas CDK // node metadata ends up in the Cloud Assembly. // GetMetadata(key *string) interface{} // Examines the CloudFormation resource and discloses attributes. Inspect(inspector awscdk.TreeInspector) // Overrides the auto-generated logical ID with a specific ID. OverrideLogicalId(newLogicalId *string) RenderProperties(props *map[string]interface{}) *map[string]interface{} // Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template. // // Returns: `true` if the resource should be included or `false` is the resource // should be omitted. ShouldSynthesize() *bool // Returns a string representation of this construct. // // Returns: a string representation of this resource. ToString() *string ValidateProperties(_properties interface{}) }
A CloudFormation `AWS::GlobalAccelerator::EndpointGroup`.
The `AWS::GlobalAccelerator::EndpointGroup` resource is a Global Accelerator resource type that contains information about how you create an endpoint group for the specified listener. An endpoint group is a collection of endpoints in one AWS Region .
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" cfnEndpointGroup := awscdk.Aws_globalaccelerator.NewCfnEndpointGroup(this, jsii.String("MyCfnEndpointGroup"), &cfnEndpointGroupProps{ endpointGroupRegion: jsii.String("endpointGroupRegion"), listenerArn: jsii.String("listenerArn"), // the properties below are optional endpointConfigurations: []interface{}{ &endpointConfigurationProperty{ endpointId: jsii.String("endpointId"), // the properties below are optional clientIpPreservationEnabled: jsii.Boolean(false), weight: jsii.Number(123), }, }, healthCheckIntervalSeconds: jsii.Number(123), healthCheckPath: jsii.String("healthCheckPath"), healthCheckPort: jsii.Number(123), healthCheckProtocol: jsii.String("healthCheckProtocol"), portOverrides: []interface{}{ &portOverrideProperty{ endpointPort: jsii.Number(123), listenerPort: jsii.Number(123), }, }, thresholdCount: jsii.Number(123), trafficDialPercentage: jsii.Number(123), })
func NewCfnEndpointGroup ¶
func NewCfnEndpointGroup(scope constructs.Construct, id *string, props *CfnEndpointGroupProps) CfnEndpointGroup
Create a new `AWS::GlobalAccelerator::EndpointGroup`.
type CfnEndpointGroupProps ¶
type CfnEndpointGroupProps struct { // The AWS Regions where the endpoint group is located. EndpointGroupRegion *string `field:"required" json:"endpointGroupRegion" yaml:"endpointGroupRegion"` // The Amazon Resource Name (ARN) of the listener. ListenerArn *string `field:"required" json:"listenerArn" yaml:"listenerArn"` // The list of endpoint objects. EndpointConfigurations interface{} `field:"optional" json:"endpointConfigurations" yaml:"endpointConfigurations"` // The time—10 seconds or 30 seconds—between health checks for each endpoint. // // The default value is 30. HealthCheckIntervalSeconds *float64 `field:"optional" json:"healthCheckIntervalSeconds" yaml:"healthCheckIntervalSeconds"` // If the protocol is HTTP/S, then this value provides the ping path that Global Accelerator uses for the destination on the endpoints for health checks. // // The default is slash (/). HealthCheckPath *string `field:"optional" json:"healthCheckPath" yaml:"healthCheckPath"` // The port that Global Accelerator uses to perform health checks on endpoints that are part of this endpoint group. // // The default port is the port for the listener that this endpoint group is associated with. If the listener port is a list, Global Accelerator uses the first specified port in the list of ports. HealthCheckPort *float64 `field:"optional" json:"healthCheckPort" yaml:"healthCheckPort"` // The protocol that Global Accelerator uses to perform health checks on endpoints that are part of this endpoint group. // // The default value is TCP. HealthCheckProtocol *string `field:"optional" json:"healthCheckProtocol" yaml:"healthCheckProtocol"` // Allows you to override the destination ports used to route traffic to an endpoint. // // Using a port override lets you to map a list of external destination ports (that your users send traffic to) to a list of internal destination ports that you want an application endpoint to receive traffic on. PortOverrides interface{} `field:"optional" json:"portOverrides" yaml:"portOverrides"` // The number of consecutive health checks required to set the state of a healthy endpoint to unhealthy, or to set an unhealthy endpoint to healthy. // // The default value is 3. ThresholdCount *float64 `field:"optional" json:"thresholdCount" yaml:"thresholdCount"` // The percentage of traffic to send to an AWS Regions . // // Additional traffic is distributed to other endpoint groups for this listener. // // Use this action to increase (dial up) or decrease (dial down) traffic to a specific Region. The percentage is applied to the traffic that would otherwise have been routed to the Region based on optimal routing. // // The default value is 100. TrafficDialPercentage *float64 `field:"optional" json:"trafficDialPercentage" yaml:"trafficDialPercentage"` }
Properties for defining a `CfnEndpointGroup`.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" cfnEndpointGroupProps := &cfnEndpointGroupProps{ endpointGroupRegion: jsii.String("endpointGroupRegion"), listenerArn: jsii.String("listenerArn"), // the properties below are optional endpointConfigurations: []interface{}{ &endpointConfigurationProperty{ endpointId: jsii.String("endpointId"), // the properties below are optional clientIpPreservationEnabled: jsii.Boolean(false), weight: jsii.Number(123), }, }, healthCheckIntervalSeconds: jsii.Number(123), healthCheckPath: jsii.String("healthCheckPath"), healthCheckPort: jsii.Number(123), healthCheckProtocol: jsii.String("healthCheckProtocol"), portOverrides: []interface{}{ &portOverrideProperty{ endpointPort: jsii.Number(123), listenerPort: jsii.Number(123), }, }, thresholdCount: jsii.Number(123), trafficDialPercentage: jsii.Number(123), }
type CfnEndpointGroup_EndpointConfigurationProperty ¶
type CfnEndpointGroup_EndpointConfigurationProperty struct { // An ID for the endpoint. // // If the endpoint is a Network Load Balancer or Application Load Balancer, this is the Amazon Resource Name (ARN) of the resource. If the endpoint is an Elastic IP address, this is the Elastic IP address allocation ID. For Amazon EC2 instances, this is the EC2 instance ID. A resource must be valid and active when you add it as an endpoint. // // An Application Load Balancer can be either internal or internet-facing. EndpointId *string `field:"required" json:"endpointId" yaml:"endpointId"` // Indicates whether client IP address preservation is enabled for an Application Load Balancer endpoint. // // The value is true or false. The default value is true for new accelerators. // // If the value is set to true, the client's IP address is preserved in the `X-Forwarded-For` request header as traffic travels to applications on the Application Load Balancer endpoint fronted by the accelerator. // // For more information, see [Preserve Client IP Addresses](https://docs.aws.amazon.com/global-accelerator/latest/dg/preserve-client-ip-address.html) in the *AWS Global Accelerator Developer Guide* . ClientIpPreservationEnabled interface{} `field:"optional" json:"clientIpPreservationEnabled" yaml:"clientIpPreservationEnabled"` // The weight associated with the endpoint. // // When you add weights to endpoints, you configure Global Accelerator to route traffic based on proportions that you specify. For example, you might specify endpoint weights of 4, 5, 5, and 6 (sum=20). The result is that 4/20 of your traffic, on average, is routed to the first endpoint, 5/20 is routed both to the second and third endpoints, and 6/20 is routed to the last endpoint. For more information, see [Endpoint Weights](https://docs.aws.amazon.com/global-accelerator/latest/dg/about-endpoints-endpoint-weights.html) in the *AWS Global Accelerator Developer Guide* . Weight *float64 `field:"optional" json:"weight" yaml:"weight"` }
A complex type for endpoints.
A resource must be valid and active when you add it as an endpoint.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" endpointConfigurationProperty := &endpointConfigurationProperty{ endpointId: jsii.String("endpointId"), // the properties below are optional clientIpPreservationEnabled: jsii.Boolean(false), weight: jsii.Number(123), }
type CfnEndpointGroup_PortOverrideProperty ¶
type CfnEndpointGroup_PortOverrideProperty struct { // The endpoint port that you want a listener port to be mapped to. // // This is the port on the endpoint, such as the Application Load Balancer or Amazon EC2 instance. EndpointPort *float64 `field:"required" json:"endpointPort" yaml:"endpointPort"` // The listener port that you want to map to a specific endpoint port. // // This is the port that user traffic arrives to the Global Accelerator on. ListenerPort *float64 `field:"required" json:"listenerPort" yaml:"listenerPort"` }
Override specific listener ports used to route traffic to endpoints that are part of an endpoint group.
For example, you can create a port override in which the listener receives user traffic on ports 80 and 443, but your accelerator routes that traffic to ports 1080 and 1443, respectively, on the endpoints.
For more information, see [Port overrides](https://docs.aws.amazon.com/global-accelerator/latest/dg/about-endpoint-groups-port-override.html) in the *AWS Global Accelerator Developer Guide* .
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" portOverrideProperty := &portOverrideProperty{ endpointPort: jsii.Number(123), listenerPort: jsii.Number(123), }
type CfnListener ¶
type CfnListener interface { awscdk.CfnResource awscdk.IInspectable // The Amazon Resource Name (ARN) of your accelerator. AcceleratorArn() *string SetAcceleratorArn(val *string) // The ARN of the listener, such as `arn:aws:globalaccelerator::012345678901:accelerator/1234abcd-abcd-1234-abcd-1234abcdefgh/listener/0123vxyz` . AttrListenerArn() *string // Options for this resource, such as condition, update policy etc. CfnOptions() awscdk.ICfnResourceOptions CfnProperties() *map[string]interface{} // AWS resource type. CfnResourceType() *string // Client affinity lets you direct all requests from a user to the same endpoint, if you have stateful applications, regardless of the port and protocol of the client request. // // Client affinity gives you control over whether to always route each client to the same specific endpoint. // // AWS Global Accelerator uses a consistent-flow hashing algorithm to choose the optimal endpoint for a connection. If client affinity is `NONE` , Global Accelerator uses the "five-tuple" (5-tuple) properties—source IP address, source port, destination IP address, destination port, and protocol—to select the hash value, and then chooses the best endpoint. However, with this setting, if someone uses different ports to connect to Global Accelerator, their connections might not be always routed to the same endpoint because the hash value changes. // // If you want a given client to always be routed to the same endpoint, set client affinity to `SOURCE_IP` instead. When you use the `SOURCE_IP` setting, Global Accelerator uses the "two-tuple" (2-tuple) properties— source (client) IP address and destination IP address—to select the hash value. // // The default value is `NONE` . ClientAffinity() *string SetClientAffinity(val *string) // Returns: the stack trace of the point where this Resource was created from, sourced // from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most // node +internal+ entries filtered. CreationStack() *[]*string // The logical ID for this CloudFormation stack element. // // The logical ID of the element // is calculated from the path of the resource node in the construct tree. // // To override this value, use `overrideLogicalId(newLogicalId)`. // // Returns: the logical ID as a stringified token. This value will only get // resolved during synthesis. LogicalId() *string // The tree node. Node() constructs.Node // The list of port ranges for the connections from clients to the accelerator. PortRanges() interface{} SetPortRanges(val interface{}) // The protocol for the connections from clients to the accelerator. Protocol() *string SetProtocol(val *string) // Return a string that will be resolved to a CloudFormation `{ Ref }` for this element. // // If, by any chance, the intrinsic reference of a resource is not a string, you could // coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`. Ref() *string // The stack in which this element is defined. // // CfnElements must be defined within a stack scope (directly or indirectly). Stack() awscdk.Stack // Deprecated. // Deprecated: use `updatedProperties` // // Return properties modified after initiation // // Resources that expose mutable properties should override this function to // collect and return the properties object for this resource. UpdatedProperites() *map[string]interface{} // Return properties modified after initiation. // // Resources that expose mutable properties should override this function to // collect and return the properties object for this resource. UpdatedProperties() *map[string]interface{} // Syntactic sugar for `addOverride(path, undefined)`. AddDeletionOverride(path *string) // Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. // // This can be used for resources across stacks (or nested stack) boundaries // and the dependency will automatically be transferred to the relevant scope. AddDependsOn(target awscdk.CfnResource) // Add a value to the CloudFormation Resource Metadata. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html // // Note that this is a different set of metadata from CDK node metadata; this // metadata ends up in the stack template under the resource, whereas CDK // node metadata ends up in the Cloud Assembly. // AddMetadata(key *string, value interface{}) // Adds an override to the synthesized CloudFormation resource. // // To add a // property override, either use `addPropertyOverride` or prefix `path` with // "Properties." (i.e. `Properties.TopicName`). // // If the override is nested, separate each nested level using a dot (.) in the path parameter. // If there is an array as part of the nesting, specify the index in the path. // // To include a literal `.` in the property name, prefix with a `\`. In most // programming languages you will need to write this as `"\\."` because the // `\` itself will need to be escaped. // // For example, // “`typescript // cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']); // cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE'); // “` // would add the overrides // “`json // "Properties": { // "GlobalSecondaryIndexes": [ // { // "Projection": { // "NonKeyAttributes": [ "myattribute" ] // ... // } // ... // }, // { // "ProjectionType": "INCLUDE" // ... // }, // ] // ... // } // “` // // The `value` argument to `addOverride` will not be processed or translated // in any way. Pass raw JSON values in here with the correct capitalization // for CloudFormation. If you pass CDK classes or structs, they will be // rendered with lowercased key names, and CloudFormation will reject the // template. AddOverride(path *string, value interface{}) // Adds an override that deletes the value of a property from the resource definition. AddPropertyDeletionOverride(propertyPath *string) // Adds an override to a resource property. // // Syntactic sugar for `addOverride("Properties.<...>", value)`. AddPropertyOverride(propertyPath *string, value interface{}) // Sets the deletion policy of the resource based on the removal policy specified. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). In some // cases, a snapshot can be taken of the resource prior to deletion // (`RemovalPolicy.SNAPSHOT`). A list of resources that support this policy // can be found in the following link:. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html#aws-attribute-deletionpolicy-options // ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions) // Returns a token for an runtime attribute of this resource. // // Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility // in case there is no generated attribute. GetAtt(attributeName *string) awscdk.Reference // Retrieve a value value from the CloudFormation Resource Metadata. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html // // Note that this is a different set of metadata from CDK node metadata; this // metadata ends up in the stack template under the resource, whereas CDK // node metadata ends up in the Cloud Assembly. // GetMetadata(key *string) interface{} // Examines the CloudFormation resource and discloses attributes. Inspect(inspector awscdk.TreeInspector) // Overrides the auto-generated logical ID with a specific ID. OverrideLogicalId(newLogicalId *string) RenderProperties(props *map[string]interface{}) *map[string]interface{} // Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template. // // Returns: `true` if the resource should be included or `false` is the resource // should be omitted. ShouldSynthesize() *bool // Returns a string representation of this construct. // // Returns: a string representation of this resource. ToString() *string ValidateProperties(_properties interface{}) }
A CloudFormation `AWS::GlobalAccelerator::Listener`.
The `AWS::GlobalAccelerator::Listener` resource is a Global Accelerator resource type that contains information about how you create a listener to process inbound connections from clients to an accelerator. Connections arrive to assigned static IP addresses on a port, port range, or list of port ranges that you specify.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" cfnListener := awscdk.Aws_globalaccelerator.NewCfnListener(this, jsii.String("MyCfnListener"), &cfnListenerProps{ acceleratorArn: jsii.String("acceleratorArn"), portRanges: []interface{}{ &portRangeProperty{ fromPort: jsii.Number(123), toPort: jsii.Number(123), }, }, protocol: jsii.String("protocol"), // the properties below are optional clientAffinity: jsii.String("clientAffinity"), })
func NewCfnListener ¶
func NewCfnListener(scope constructs.Construct, id *string, props *CfnListenerProps) CfnListener
Create a new `AWS::GlobalAccelerator::Listener`.
type CfnListenerProps ¶
type CfnListenerProps struct { // The Amazon Resource Name (ARN) of your accelerator. AcceleratorArn *string `field:"required" json:"acceleratorArn" yaml:"acceleratorArn"` // The list of port ranges for the connections from clients to the accelerator. PortRanges interface{} `field:"required" json:"portRanges" yaml:"portRanges"` // The protocol for the connections from clients to the accelerator. Protocol *string `field:"required" json:"protocol" yaml:"protocol"` // Client affinity lets you direct all requests from a user to the same endpoint, if you have stateful applications, regardless of the port and protocol of the client request. // // Client affinity gives you control over whether to always route each client to the same specific endpoint. // // AWS Global Accelerator uses a consistent-flow hashing algorithm to choose the optimal endpoint for a connection. If client affinity is `NONE` , Global Accelerator uses the "five-tuple" (5-tuple) properties—source IP address, source port, destination IP address, destination port, and protocol—to select the hash value, and then chooses the best endpoint. However, with this setting, if someone uses different ports to connect to Global Accelerator, their connections might not be always routed to the same endpoint because the hash value changes. // // If you want a given client to always be routed to the same endpoint, set client affinity to `SOURCE_IP` instead. When you use the `SOURCE_IP` setting, Global Accelerator uses the "two-tuple" (2-tuple) properties— source (client) IP address and destination IP address—to select the hash value. // // The default value is `NONE` . ClientAffinity *string `field:"optional" json:"clientAffinity" yaml:"clientAffinity"` }
Properties for defining a `CfnListener`.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" cfnListenerProps := &cfnListenerProps{ acceleratorArn: jsii.String("acceleratorArn"), portRanges: []interface{}{ &portRangeProperty{ fromPort: jsii.Number(123), toPort: jsii.Number(123), }, }, protocol: jsii.String("protocol"), // the properties below are optional clientAffinity: jsii.String("clientAffinity"), }
type CfnListener_PortRangeProperty ¶
type CfnListener_PortRangeProperty struct { // The first port in the range of ports, inclusive. FromPort *float64 `field:"required" json:"fromPort" yaml:"fromPort"` // The last port in the range of ports, inclusive. ToPort *float64 `field:"required" json:"toPort" yaml:"toPort"` }
A complex type for a range of ports for a listener.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" portRangeProperty := &portRangeProperty{ fromPort: jsii.Number(123), toPort: jsii.Number(123), }
type ClientAffinity ¶
type ClientAffinity string
Client affinity gives you control over whether to always route each client to the same specific endpoint. See: https://docs.aws.amazon.com/global-accelerator/latest/dg/about-listeners.html#about-listeners-client-affinity
const ( // Route traffic based on the 5-tuple `(source IP, source port, destination IP, destination port, protocol)`. ClientAffinity_NONE ClientAffinity = "NONE" // Route traffic based on the 2-tuple `(source IP, destination IP)`. // // The result is that multiple connections from the same client will be routed the same. ClientAffinity_SOURCE_IP ClientAffinity = "SOURCE_IP" )
type ConnectionProtocol ¶
type ConnectionProtocol string
The protocol for the connections from clients to the accelerator.
const ( // TCP. ConnectionProtocol_TCP ConnectionProtocol = "TCP" // UDP. ConnectionProtocol_UDP ConnectionProtocol = "UDP" )
type EndpointGroup ¶
type EndpointGroup interface { awscdk.Resource IEndpointGroup // EndpointGroup ARN. EndpointGroupArn() *string // The name of the endpoint group. EndpointGroupName() *string // The array of the endpoints in this endpoint group. Endpoints() *[]IEndpoint // The environment this resource belongs to. // // For resources that are created and managed by the CDK // (generally, those created by creating new class instances like Role, Bucket, etc.), // this is always the same as the environment of the stack they belong to; // however, for imported resources // (those obtained from static methods like fromRoleArn, fromBucketName, etc.), // that might be different than the stack they were imported into. Env() *awscdk.ResourceEnvironment // The tree node. Node() constructs.Node // Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource. // // This value will resolve to one of the following: // - a concrete value (e.g. `"my-awesome-bucket"`) // - `undefined`, when a name should be generated by CloudFormation // - a concrete name generated automatically during synthesis, in // cross-environment scenarios. PhysicalName() *string // The stack in which this resource is defined. Stack() awscdk.Stack // Add an endpoint. AddEndpoint(endpoint IEndpoint) // Apply the given removal policy to this resource. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). ApplyRemovalPolicy(policy awscdk.RemovalPolicy) // Return an object that represents the Accelerator's Security Group. // // Uses a Custom Resource to look up the Security Group that Accelerator // creates at deploy time. Requires your VPC ID to perform the lookup. // // The Security Group will only be created if you enable **Client IP // Preservation** on any of the endpoints. // // You cannot manipulate the rules inside this security group, but you can // use this security group as a Peer in Connections rules on other // constructs. ConnectionsPeer(id *string, vpc awsec2.IVpc) awsec2.IPeer GeneratePhysicalName() *string // Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`). // // Normally, this token will resolve to `arnAttr`, but if the resource is // referenced across environments, `arnComponents` will be used to synthesize // a concrete ARN with the resource's physical name. Make sure to reference // `this.physicalName` in `arnComponents`. GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string // Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`). // // Normally, this token will resolve to `nameAttr`, but if the resource is // referenced across environments, it will be resolved to `this.physicalName`, // which will be a concrete name. GetResourceNameAttribute(nameAttr *string) *string // Returns a string representation of this construct. ToString() *string }
EndpointGroup construct.
Example:
var listener listener // Non-open ALB var alb applicationLoadBalancer // Remember that there is only one AGA security group per VPC. var vpc vpc endpointGroup := listener.addEndpointGroup(jsii.String("Group"), &endpointGroupOptions{ endpoints: []iEndpoint{ ga_endpoints.NewApplicationLoadBalancerEndpoint(alb, &applicationLoadBalancerEndpointOptions{ preserveClientIp: jsii.Boolean(true), }), }, }) agaSg := endpointGroup.connectionsPeer(jsii.String("GlobalAcceleratorSG"), vpc) // Allow connections from the AGA to the ALB alb.connections.allowFrom(agaSg, ec2.port.tcp(jsii.Number(443)))
func NewEndpointGroup ¶
func NewEndpointGroup(scope constructs.Construct, id *string, props *EndpointGroupProps) EndpointGroup
type EndpointGroupOptions ¶
type EndpointGroupOptions struct { // Name of the endpoint group. EndpointGroupName *string `field:"optional" json:"endpointGroupName" yaml:"endpointGroupName"` // Initial list of endpoints for this group. Endpoints *[]IEndpoint `field:"optional" json:"endpoints" yaml:"endpoints"` // The time between health checks for each endpoint. // // Must be either 10 or 30 seconds. HealthCheckInterval awscdk.Duration `field:"optional" json:"healthCheckInterval" yaml:"healthCheckInterval"` // The ping path for health checks (if the protocol is HTTP(S)). HealthCheckPath *string `field:"optional" json:"healthCheckPath" yaml:"healthCheckPath"` // The port used to perform health checks. HealthCheckPort *float64 `field:"optional" json:"healthCheckPort" yaml:"healthCheckPort"` // The protocol used to perform health checks. HealthCheckProtocol HealthCheckProtocol `field:"optional" json:"healthCheckProtocol" yaml:"healthCheckProtocol"` // The number of consecutive health checks required to set the state of a healthy endpoint to unhealthy, or to set an unhealthy endpoint to healthy. HealthCheckThreshold *float64 `field:"optional" json:"healthCheckThreshold" yaml:"healthCheckThreshold"` // Override the destination ports used to route traffic to an endpoint. // // Unless overridden, the port used to hit the endpoint will be the same as the port // that traffic arrives on at the listener. PortOverrides *[]*PortOverride `field:"optional" json:"portOverrides" yaml:"portOverrides"` // The AWS Region where the endpoint group is located. Region *string `field:"optional" json:"region" yaml:"region"` // The percentage of traffic to send to this AWS Region. // // The percentage is applied to the traffic that would otherwise have been // routed to the Region based on optimal routing. Additional traffic is // distributed to other endpoint groups for this listener. TrafficDialPercentage *float64 `field:"optional" json:"trafficDialPercentage" yaml:"trafficDialPercentage"` }
Basic options for creating a new EndpointGroup.
Example:
var alb applicationLoadBalancer var listener listener listener.addEndpointGroup(jsii.String("Group"), &endpointGroupOptions{ endpoints: []iEndpoint{ ga_endpoints.NewApplicationLoadBalancerEndpoint(alb, &applicationLoadBalancerEndpointOptions{ weight: jsii.Number(128), preserveClientIp: jsii.Boolean(true), }), }, })
type EndpointGroupProps ¶
type EndpointGroupProps struct { // Name of the endpoint group. EndpointGroupName *string `field:"optional" json:"endpointGroupName" yaml:"endpointGroupName"` // Initial list of endpoints for this group. Endpoints *[]IEndpoint `field:"optional" json:"endpoints" yaml:"endpoints"` // The time between health checks for each endpoint. // // Must be either 10 or 30 seconds. HealthCheckInterval awscdk.Duration `field:"optional" json:"healthCheckInterval" yaml:"healthCheckInterval"` // The ping path for health checks (if the protocol is HTTP(S)). HealthCheckPath *string `field:"optional" json:"healthCheckPath" yaml:"healthCheckPath"` // The port used to perform health checks. HealthCheckPort *float64 `field:"optional" json:"healthCheckPort" yaml:"healthCheckPort"` // The protocol used to perform health checks. HealthCheckProtocol HealthCheckProtocol `field:"optional" json:"healthCheckProtocol" yaml:"healthCheckProtocol"` // The number of consecutive health checks required to set the state of a healthy endpoint to unhealthy, or to set an unhealthy endpoint to healthy. HealthCheckThreshold *float64 `field:"optional" json:"healthCheckThreshold" yaml:"healthCheckThreshold"` // Override the destination ports used to route traffic to an endpoint. // // Unless overridden, the port used to hit the endpoint will be the same as the port // that traffic arrives on at the listener. PortOverrides *[]*PortOverride `field:"optional" json:"portOverrides" yaml:"portOverrides"` // The AWS Region where the endpoint group is located. Region *string `field:"optional" json:"region" yaml:"region"` // The percentage of traffic to send to this AWS Region. // // The percentage is applied to the traffic that would otherwise have been // routed to the Region based on optimal routing. Additional traffic is // distributed to other endpoint groups for this listener. TrafficDialPercentage *float64 `field:"optional" json:"trafficDialPercentage" yaml:"trafficDialPercentage"` // The Amazon Resource Name (ARN) of the listener. Listener IListener `field:"required" json:"listener" yaml:"listener"` }
Property of the EndpointGroup.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import cdk "github.com/aws/aws-cdk-go/awscdk" import "github.com/aws/aws-cdk-go/awscdk" var endpoint iEndpoint var listener listener endpointGroupProps := &endpointGroupProps{ listener: listener, // the properties below are optional endpointGroupName: jsii.String("endpointGroupName"), endpoints: []*iEndpoint{ endpoint, }, healthCheckInterval: cdk.duration.minutes(jsii.Number(30)), healthCheckPath: jsii.String("healthCheckPath"), healthCheckPort: jsii.Number(123), healthCheckProtocol: awscdk.Aws_globalaccelerator.healthCheckProtocol_TCP, healthCheckThreshold: jsii.Number(123), portOverrides: []portOverride{ &portOverride{ endpointPort: jsii.Number(123), listenerPort: jsii.Number(123), }, }, region: jsii.String("region"), trafficDialPercentage: jsii.Number(123), }
type HealthCheckProtocol ¶
type HealthCheckProtocol string
The protocol for the connections from clients to the accelerator.
const ( // TCP. HealthCheckProtocol_TCP HealthCheckProtocol = "TCP" // HTTP. HealthCheckProtocol_HTTP HealthCheckProtocol = "HTTP" // HTTPS. HealthCheckProtocol_HTTPS HealthCheckProtocol = "HTTPS" )
type IAccelerator ¶
type IAccelerator interface { awscdk.IResource // The ARN of the accelerator. AcceleratorArn() *string // The Domain Name System (DNS) name that Global Accelerator creates that points to your accelerator's static IP addresses. DnsName() *string }
The interface of the Accelerator.
func Accelerator_FromAcceleratorAttributes ¶
func Accelerator_FromAcceleratorAttributes(scope constructs.Construct, id *string, attrs *AcceleratorAttributes) IAccelerator
import from attributes.
type IEndpoint ¶
type IEndpoint interface { // Render the endpoint to an endpoint configuration. RenderEndpointConfiguration() interface{} // The region where the endpoint is located. // // If the region cannot be determined, `undefined` is returned. Region() *string }
An endpoint for the endpoint group.
Implementations of `IEndpoint` can be found in the `aws-globalaccelerator-endpoints` package.
type IEndpointGroup ¶
type IEndpointGroup interface { awscdk.IResource // EndpointGroup ARN. EndpointGroupArn() *string }
The interface of the EndpointGroup.
func EndpointGroup_FromEndpointGroupArn ¶
func EndpointGroup_FromEndpointGroupArn(scope constructs.Construct, id *string, endpointGroupArn *string) IEndpointGroup
import from ARN.
type IListener ¶
type IListener interface { awscdk.IResource // The ARN of the listener. ListenerArn() *string }
Interface of the Listener.
func Listener_FromListenerArn ¶
func Listener_FromListenerArn(scope constructs.Construct, id *string, listenerArn *string) IListener
import from ARN.
type Listener ¶
type Listener interface { awscdk.Resource IListener // The environment this resource belongs to. // // For resources that are created and managed by the CDK // (generally, those created by creating new class instances like Role, Bucket, etc.), // this is always the same as the environment of the stack they belong to; // however, for imported resources // (those obtained from static methods like fromRoleArn, fromBucketName, etc.), // that might be different than the stack they were imported into. Env() *awscdk.ResourceEnvironment // The ARN of the listener. ListenerArn() *string // The name of the listener. ListenerName() *string // The tree node. Node() constructs.Node // Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource. // // This value will resolve to one of the following: // - a concrete value (e.g. `"my-awesome-bucket"`) // - `undefined`, when a name should be generated by CloudFormation // - a concrete name generated automatically during synthesis, in // cross-environment scenarios. PhysicalName() *string // The stack in which this resource is defined. Stack() awscdk.Stack // Add a new endpoint group to this listener. AddEndpointGroup(id *string, options *EndpointGroupOptions) EndpointGroup // Apply the given removal policy to this resource. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). ApplyRemovalPolicy(policy awscdk.RemovalPolicy) GeneratePhysicalName() *string // Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`). // // Normally, this token will resolve to `arnAttr`, but if the resource is // referenced across environments, `arnComponents` will be used to synthesize // a concrete ARN with the resource's physical name. Make sure to reference // `this.physicalName` in `arnComponents`. GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string // Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`). // // Normally, this token will resolve to `nameAttr`, but if the resource is // referenced across environments, it will be resolved to `this.physicalName`, // which will be a concrete name. GetResourceNameAttribute(nameAttr *string) *string // Returns a string representation of this construct. ToString() *string }
The construct for the Listener.
Example:
// Create an Accelerator accelerator := globalaccelerator.NewAccelerator(this, jsii.String("Accelerator")) // Create a Listener listener := accelerator.addListener(jsii.String("Listener"), &listenerOptions{ portRanges: []portRange{ &portRange{ fromPort: jsii.Number(80), }, &portRange{ fromPort: jsii.Number(443), }, }, }) // Import the Load Balancers nlb1 := elbv2.networkLoadBalancer.fromNetworkLoadBalancerAttributes(this, jsii.String("NLB1"), &networkLoadBalancerAttributes{ loadBalancerArn: jsii.String("arn:aws:elasticloadbalancing:us-west-2:111111111111:loadbalancer/app/my-load-balancer1/e16bef66805b"), }) nlb2 := elbv2.networkLoadBalancer.fromNetworkLoadBalancerAttributes(this, jsii.String("NLB2"), &networkLoadBalancerAttributes{ loadBalancerArn: jsii.String("arn:aws:elasticloadbalancing:ap-south-1:111111111111:loadbalancer/app/my-load-balancer2/5513dc2ea8a1"), }) // Add one EndpointGroup for each Region we are targeting listener.addEndpointGroup(jsii.String("Group1"), &endpointGroupOptions{ endpoints: []iEndpoint{ ga_endpoints.NewNetworkLoadBalancerEndpoint(nlb1), }, }) listener.addEndpointGroup(jsii.String("Group2"), &endpointGroupOptions{ // Imported load balancers automatically calculate their Region from the ARN. // If you are load balancing to other resources, you must also pass a `region` // parameter here. endpoints: []*iEndpoint{ ga_endpoints.NewNetworkLoadBalancerEndpoint(nlb2), }, })
func NewListener ¶
func NewListener(scope constructs.Construct, id *string, props *ListenerProps) Listener
type ListenerOptions ¶
type ListenerOptions struct { // The list of port ranges for the connections from clients to the accelerator. PortRanges *[]*PortRange `field:"required" json:"portRanges" yaml:"portRanges"` // Client affinity to direct all requests from a user to the same endpoint. // // If you have stateful applications, client affinity lets you direct all // requests from a user to the same endpoint. // // By default, each connection from each client is routed to seperate // endpoints. Set client affinity to SOURCE_IP to route all connections from // a single client to the same endpoint. ClientAffinity ClientAffinity `field:"optional" json:"clientAffinity" yaml:"clientAffinity"` // Name of the listener. ListenerName *string `field:"optional" json:"listenerName" yaml:"listenerName"` // The protocol for the connections from clients to the accelerator. Protocol ConnectionProtocol `field:"optional" json:"protocol" yaml:"protocol"` }
Construct options for Listener.
Example:
// Create an Accelerator accelerator := globalaccelerator.NewAccelerator(this, jsii.String("Accelerator")) // Create a Listener listener := accelerator.addListener(jsii.String("Listener"), &listenerOptions{ portRanges: []portRange{ &portRange{ fromPort: jsii.Number(80), }, &portRange{ fromPort: jsii.Number(443), }, }, }) // Import the Load Balancers nlb1 := elbv2.networkLoadBalancer.fromNetworkLoadBalancerAttributes(this, jsii.String("NLB1"), &networkLoadBalancerAttributes{ loadBalancerArn: jsii.String("arn:aws:elasticloadbalancing:us-west-2:111111111111:loadbalancer/app/my-load-balancer1/e16bef66805b"), }) nlb2 := elbv2.networkLoadBalancer.fromNetworkLoadBalancerAttributes(this, jsii.String("NLB2"), &networkLoadBalancerAttributes{ loadBalancerArn: jsii.String("arn:aws:elasticloadbalancing:ap-south-1:111111111111:loadbalancer/app/my-load-balancer2/5513dc2ea8a1"), }) // Add one EndpointGroup for each Region we are targeting listener.addEndpointGroup(jsii.String("Group1"), &endpointGroupOptions{ endpoints: []iEndpoint{ ga_endpoints.NewNetworkLoadBalancerEndpoint(nlb1), }, }) listener.addEndpointGroup(jsii.String("Group2"), &endpointGroupOptions{ // Imported load balancers automatically calculate their Region from the ARN. // If you are load balancing to other resources, you must also pass a `region` // parameter here. endpoints: []*iEndpoint{ ga_endpoints.NewNetworkLoadBalancerEndpoint(nlb2), }, })
type ListenerProps ¶
type ListenerProps struct { // The list of port ranges for the connections from clients to the accelerator. PortRanges *[]*PortRange `field:"required" json:"portRanges" yaml:"portRanges"` // Client affinity to direct all requests from a user to the same endpoint. // // If you have stateful applications, client affinity lets you direct all // requests from a user to the same endpoint. // // By default, each connection from each client is routed to seperate // endpoints. Set client affinity to SOURCE_IP to route all connections from // a single client to the same endpoint. ClientAffinity ClientAffinity `field:"optional" json:"clientAffinity" yaml:"clientAffinity"` // Name of the listener. ListenerName *string `field:"optional" json:"listenerName" yaml:"listenerName"` // The protocol for the connections from clients to the accelerator. Protocol ConnectionProtocol `field:"optional" json:"protocol" yaml:"protocol"` // The accelerator for this listener. Accelerator IAccelerator `field:"required" json:"accelerator" yaml:"accelerator"` }
Construct properties for Listener.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" var accelerator accelerator listenerProps := &listenerProps{ accelerator: accelerator, portRanges: []portRange{ &portRange{ fromPort: jsii.Number(123), // the properties below are optional toPort: jsii.Number(123), }, }, // the properties below are optional clientAffinity: awscdk.Aws_globalaccelerator.clientAffinity_NONE, listenerName: jsii.String("listenerName"), protocol: awscdk.*Aws_globalaccelerator.connectionProtocol_TCP, }
type PortOverride ¶
type PortOverride struct { // The endpoint port that you want a listener port to be mapped to. // // This is the port on the endpoint, such as the Application Load Balancer or Amazon EC2 instance. EndpointPort *float64 `field:"required" json:"endpointPort" yaml:"endpointPort"` // The listener port that you want to map to a specific endpoint port. // // This is the port that user traffic arrives to the Global Accelerator on. ListenerPort *float64 `field:"required" json:"listenerPort" yaml:"listenerPort"` }
Override specific listener ports used to route traffic to endpoints that are part of an endpoint group.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" portOverride := &portOverride{ endpointPort: jsii.Number(123), listenerPort: jsii.Number(123), }
type PortRange ¶
type PortRange struct { // The first port in the range of ports, inclusive. FromPort *float64 `field:"required" json:"fromPort" yaml:"fromPort"` // The last port in the range of ports, inclusive. ToPort *float64 `field:"optional" json:"toPort" yaml:"toPort"` }
The list of port ranges for the connections from clients to the accelerator.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" portRange := &portRange{ fromPort: jsii.Number(123), // the properties below are optional toPort: jsii.Number(123), }
type RawEndpoint ¶
type RawEndpoint interface { IEndpoint // The region where the endpoint is located. // // If the region cannot be determined, `undefined` is returned. Region() *string // Render the endpoint to an endpoint configuration. RenderEndpointConfiguration() interface{} }
Untyped endpoint implementation.
Prefer using the classes in the `aws-globalaccelerator-endpoints` package instead, as they accept typed constructs. You can use this class if you want to use an endpoint type that does not have an appropriate class in that package yet.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" rawEndpoint := awscdk.Aws_globalaccelerator.NewRawEndpoint(&rawEndpointProps{ endpointId: jsii.String("endpointId"), // the properties below are optional preserveClientIp: jsii.Boolean(false), region: jsii.String("region"), weight: jsii.Number(123), })
func NewRawEndpoint ¶
func NewRawEndpoint(props *RawEndpointProps) RawEndpoint
type RawEndpointProps ¶
type RawEndpointProps struct { // Identifier of the endpoint. // // Load balancer ARN, instance ID or EIP allocation ID. EndpointId *string `field:"required" json:"endpointId" yaml:"endpointId"` // Forward the client IP address. // // GlobalAccelerator will create Network Interfaces in your VPC in order // to preserve the client IP address. // // Only applies to Application Load Balancers and EC2 instances. // // Client IP address preservation is supported only in specific AWS Regions. // See the GlobalAccelerator Developer Guide for a list. PreserveClientIp *bool `field:"optional" json:"preserveClientIp" yaml:"preserveClientIp"` // The region where this endpoint is located. Region *string `field:"optional" json:"region" yaml:"region"` // Endpoint weight across all endpoints in the group. // // Must be a value between 0 and 255. Weight *float64 `field:"optional" json:"weight" yaml:"weight"` }
Properties for RawEndpoint.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import "github.com/aws/aws-cdk-go/awscdk" rawEndpointProps := &rawEndpointProps{ endpointId: jsii.String("endpointId"), // the properties below are optional preserveClientIp: jsii.Boolean(false), region: jsii.String("region"), weight: jsii.Number(123), }
Source Files ¶
- awsglobalaccelerator.go
- awsglobalaccelerator_Accelerator.go
- awsglobalaccelerator_AcceleratorAttributes.go
- awsglobalaccelerator_AcceleratorProps.go
- awsglobalaccelerator_Accelerator__runtime_type_checks.go
- awsglobalaccelerator_CfnAccelerator.go
- awsglobalaccelerator_CfnAcceleratorProps.go
- awsglobalaccelerator_CfnAccelerator__runtime_type_checks.go
- awsglobalaccelerator_CfnEndpointGroup.go
- awsglobalaccelerator_CfnEndpointGroupProps.go
- awsglobalaccelerator_CfnEndpointGroup_EndpointConfigurationProperty.go
- awsglobalaccelerator_CfnEndpointGroup_PortOverrideProperty.go
- awsglobalaccelerator_CfnEndpointGroup__runtime_type_checks.go
- awsglobalaccelerator_CfnListener.go
- awsglobalaccelerator_CfnListenerProps.go
- awsglobalaccelerator_CfnListener_PortRangeProperty.go
- awsglobalaccelerator_CfnListener__runtime_type_checks.go
- awsglobalaccelerator_ClientAffinity.go
- awsglobalaccelerator_ConnectionProtocol.go
- awsglobalaccelerator_EndpointGroup.go
- awsglobalaccelerator_EndpointGroupOptions.go
- awsglobalaccelerator_EndpointGroupProps.go
- awsglobalaccelerator_EndpointGroup__runtime_type_checks.go
- awsglobalaccelerator_HealthCheckProtocol.go
- awsglobalaccelerator_IAccelerator.go
- awsglobalaccelerator_IEndpoint.go
- awsglobalaccelerator_IEndpointGroup.go
- awsglobalaccelerator_IListener.go
- awsglobalaccelerator_Listener.go
- awsglobalaccelerator_ListenerOptions.go
- awsglobalaccelerator_ListenerProps.go
- awsglobalaccelerator_Listener__runtime_type_checks.go
- awsglobalaccelerator_PortOverride.go
- awsglobalaccelerator_PortRange.go
- awsglobalaccelerator_RawEndpoint.go
- awsglobalaccelerator_RawEndpointProps.go
- awsglobalaccelerator_RawEndpoint__runtime_type_checks.go