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(x interface{}) *bool
- func CfnAccelerator_IsConstruct(x interface{}) *bool
- func CfnCrossAccountAttachment_CFN_RESOURCE_TYPE_NAME() *string
- func CfnCrossAccountAttachment_IsCfnElement(x interface{}) *bool
- func CfnCrossAccountAttachment_IsCfnResource(x interface{}) *bool
- func CfnCrossAccountAttachment_IsConstruct(x interface{}) *bool
- func CfnEndpointGroup_CFN_RESOURCE_TYPE_NAME() *string
- func CfnEndpointGroup_IsCfnElement(x interface{}) *bool
- func CfnEndpointGroup_IsCfnResource(x interface{}) *bool
- func CfnEndpointGroup_IsConstruct(x interface{}) *bool
- func CfnListener_CFN_RESOURCE_TYPE_NAME() *string
- func CfnListener_IsCfnElement(x interface{}) *bool
- func CfnListener_IsCfnResource(x interface{}) *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 NewCfnCrossAccountAttachment_Override(c CfnCrossAccountAttachment, 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 CfnCrossAccountAttachment
- type CfnCrossAccountAttachmentProps
- type CfnCrossAccountAttachment_ResourceProperty
- 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 IpAddressType
- 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(x interface{}) *bool
Check whether the given object 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 CfnCrossAccountAttachment_CFN_RESOURCE_TYPE_NAME ¶ added in v2.138.0
func CfnCrossAccountAttachment_CFN_RESOURCE_TYPE_NAME() *string
func CfnCrossAccountAttachment_IsCfnElement ¶ added in v2.138.0
func CfnCrossAccountAttachment_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 CfnCrossAccountAttachment_IsCfnResource ¶ added in v2.138.0
func CfnCrossAccountAttachment_IsCfnResource(x interface{}) *bool
Check whether the given object is a CfnResource.
func CfnCrossAccountAttachment_IsConstruct ¶ added in v2.138.0
func CfnCrossAccountAttachment_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(x interface{}) *bool
Check whether the given object 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(x interface{}) *bool
Check whether the given object 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)
func NewCfnCrossAccountAttachment_Override ¶ added in v2.138.0
func NewCfnCrossAccountAttachment_Override(c CfnCrossAccountAttachment, scope constructs.Construct, id *string, props *CfnCrossAccountAttachmentProps)
func NewCfnEndpointGroup_Override ¶
func NewCfnEndpointGroup_Override(c CfnEndpointGroup, scope constructs.Construct, id *string, props *CfnEndpointGroupProps)
func NewCfnListener_Override ¶
func NewCfnListener_Override(c CfnListener, scope constructs.Construct, id *string, props *CfnListenerProps)
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 DNS name that points to the dual-stack accelerator's four static IP addresses: two IPv4 addresses and two IPv6 addresses. DualStackDnsName() *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 array of IPv4 addresses in the IP address set. Ipv4Addresses() *[]*string // The array of IPv6 addresses in the IP address set. Ipv6Addresses() *[]*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 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"` // The DNS name that points to the dual-stack accelerator's four static IP addresses: two IPv4 addresses and two IPv6 addresses. // Default: - undefined. // DualStackDnsName *string `field:"optional" json:"dualStackDnsName" yaml:"dualStackDnsName"` // The array of IPv4 addresses in the IP address set. // Default: - undefined. // Ipv4Addresses *[]*string `field:"optional" json:"ipv4Addresses" yaml:"ipv4Addresses"` // The array of IPv6 addresses in the IP address set. // Default: - undefined. // Ipv6Addresses *[]*string `field:"optional" json:"ipv6Addresses" yaml:"ipv6Addresses"` }
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"), // the properties below are optional DualStackDnsName: jsii.String("dualStackDnsName"), Ipv4Addresses: []*string{ jsii.String("ipv4Addresses"), }, Ipv6Addresses: []*string{ jsii.String("ipv6Addresses"), }, }
type AcceleratorProps ¶
type AcceleratorProps struct { // The name of the accelerator. // Default: - resource ID. // AcceleratorName *string `field:"optional" json:"acceleratorName" yaml:"acceleratorName"` // Indicates whether the accelerator is enabled. // Default: true. // Enabled *bool `field:"optional" json:"enabled" yaml:"enabled"` // IP addresses associated with the accelerator. // // 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. // Default: - undefined. IP addresses will be from Amazon's pool of IP addresses. // IpAddresses *[]*string `field:"optional" json:"ipAddresses" yaml:"ipAddresses"` // The IP address type that an accelerator supports. // // For a standard accelerator, the value can be IPV4 or DUAL_STACK. // Default: - "IPV4". // IpAddressType IpAddressType `field:"optional" json:"ipAddressType" yaml:"ipAddressType"` }
Construct properties of the Accelerator.
Example:
accelerator := globalaccelerator.NewAccelerator(this, jsii.String("Accelerator"), &AcceleratorProps{ IpAddresses: []*string{ jsii.String("1.1.1.1"), jsii.String("2.2.2.2"), }, IpAddressType: globalaccelerator.IpAddressType_IPV4, })
type CfnAccelerator ¶
type CfnAccelerator interface { awscdk.CfnResource awscdk.IInspectable awscdk.ITaggable // 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 an accelerator's static IPv4 addresses. AttrDnsName() *string // The DNS name that Global Accelerator creates that points to a dual-stack accelerator's four static IP addresses: two IPv4 addresses and two IPv6 addresses. AttrDualStackDnsName() *string // The array of IPv4 addresses in the IP address set. // // An IP address set can have a maximum of two IP addresses. AttrIpv4Addresses() *[]*string // The array of IPv6 addresses in the IP address set. // // An IP address set can have a maximum of two IP addresses. AttrIpv6Addresses() *[]*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. 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. IpAddresses() *[]*string SetIpAddresses(val *[]*string) // The IP address type that an accelerator supports. 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. 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 // Tag Manager which manages the tags for this resource. Tags() awscdk.TagManager // Create tags for an accelerator. TagsRaw() *[]*awscdk.CfnTag SetTagsRaw(val *[]*awscdk.CfnTag) // 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. AddDependency(target awscdk.CfnResource) // Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. // Deprecated: use addDependency. 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, typeHint awscdk.ResolutionTypeHint) 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) // Retrieves an array of resources this resource depends on. // // This assembles dependencies on resources across stacks (including nested stacks) // automatically. ObtainDependencies() *[]interface{} // Get a shallow copy of dependencies between this resource and other resources in the same stack. ObtainResourceDependencies() *[]awscdk.CfnResource // Overrides the auto-generated logical ID with a specific ID. OverrideLogicalId(newLogicalId *string) // Indicates that this resource no longer depends on another resource. // // This can be used for resources across stacks (including nested stacks) // and the dependency will automatically be removed from the relevant scope. RemoveDependency(target awscdk.CfnResource) RenderProperties(props *map[string]interface{}) *map[string]interface{} // Replaces one dependency with another. ReplaceDependency(target awscdk.CfnResource, newTarget awscdk.CfnResource) // 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{}) }
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
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. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-globalaccelerator-accelerator.html#cfn-globalaccelerator-accelerator-name // 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. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-globalaccelerator-accelerator.html#cfn-globalaccelerator-accelerator-enabled // // Default: - true. // 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* . // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-globalaccelerator-accelerator.html#cfn-globalaccelerator-accelerator-ipaddresses // IpAddresses *[]*string `field:"optional" json:"ipAddresses" yaml:"ipAddresses"` // The IP address type that an accelerator supports. // // For a standard accelerator, the value can be IPV4 or DUAL_STACK. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-globalaccelerator-accelerator.html#cfn-globalaccelerator-accelerator-ipaddresstype // // Default: - "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* . // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-globalaccelerator-accelerator.html#cfn-globalaccelerator-accelerator-tags // 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 CfnCrossAccountAttachment ¶ added in v2.138.0
type CfnCrossAccountAttachment interface { awscdk.CfnResource awscdk.IInspectable awscdk.ITaggableV2 // The Amazon Resource Name (ARN) of the cross-account attachment. AttrAttachmentArn() *string // Tag Manager which manages the tags for this resource. CdkTagManager() awscdk.TagManager // 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 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 cross-account attachment. Name() *string SetName(val *string) // The tree node. Node() constructs.Node // The principals included in the cross-account attachment. Principals() *[]*string SetPrincipals(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 resources included in the cross-account attachment. Resources() interface{} SetResources(val interface{}) // The stack in which this element is defined. // // CfnElements must be defined within a stack scope (directly or indirectly). Stack() awscdk.Stack // Add tags for a cross-account attachment. Tags() *[]*awscdk.CfnTag SetTags(val *[]*awscdk.CfnTag) // 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. AddDependency(target awscdk.CfnResource) // Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. // Deprecated: use addDependency. 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, typeHint awscdk.ResolutionTypeHint) 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) // Retrieves an array of resources this resource depends on. // // This assembles dependencies on resources across stacks (including nested stacks) // automatically. ObtainDependencies() *[]interface{} // Get a shallow copy of dependencies between this resource and other resources in the same stack. ObtainResourceDependencies() *[]awscdk.CfnResource // Overrides the auto-generated logical ID with a specific ID. OverrideLogicalId(newLogicalId *string) // Indicates that this resource no longer depends on another resource. // // This can be used for resources across stacks (including nested stacks) // and the dependency will automatically be removed from the relevant scope. RemoveDependency(target awscdk.CfnResource) RenderProperties(props *map[string]interface{}) *map[string]interface{} // Replaces one dependency with another. ReplaceDependency(target awscdk.CfnResource, newTarget awscdk.CfnResource) // 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{}) }
Create a cross-account attachment in AWS Global Accelerator .
You create a cross-account attachment to specify the *principals* who have permission to work with *resources* in accelerators in their own account. You specify, in the same attachment, the resources that are shared.
A principal can be an AWS account number or the Amazon Resource Name (ARN) for an accelerator. For account numbers that are listed as principals, to work with a resource listed in the attachment, you must sign in to an account specified as a principal. Then, you can work with resources that are listed, with any of your accelerators. If an accelerator ARN is listed in the cross-account attachment as a principal, anyone with permission to make updates to the accelerator can work with resources that are listed in the attachment.
Specify each principal and resource separately. To specify two CIDR address pools, list them individually under `Resources` , and so on. For a command line operation, for example, you might use a statement like the following:
`"Resources": [{"Cidr": "169.254.60.0/24"},{"Cidr": "169.254.59.0/24"}]`
For more information, see [Working with cross-account attachments and resources in AWS Global Accelerator](https://docs.aws.amazon.com/global-accelerator/latest/dg/cross-account-resources.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" cfnCrossAccountAttachment := awscdk.Aws_globalaccelerator.NewCfnCrossAccountAttachment(this, jsii.String("MyCfnCrossAccountAttachment"), &CfnCrossAccountAttachmentProps{ Name: jsii.String("name"), // the properties below are optional Principals: []*string{ jsii.String("principals"), }, Resources: []interface{}{ &ResourceProperty{ EndpointId: jsii.String("endpointId"), // the properties below are optional Region: jsii.String("region"), }, }, Tags: []cfnTag{ &cfnTag{ Key: jsii.String("key"), Value: jsii.String("value"), }, }, })
func NewCfnCrossAccountAttachment ¶ added in v2.138.0
func NewCfnCrossAccountAttachment(scope constructs.Construct, id *string, props *CfnCrossAccountAttachmentProps) CfnCrossAccountAttachment
type CfnCrossAccountAttachmentProps ¶ added in v2.138.0
type CfnCrossAccountAttachmentProps struct { // The name of the cross-account attachment. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-globalaccelerator-crossaccountattachment.html#cfn-globalaccelerator-crossaccountattachment-name // Name *string `field:"required" json:"name" yaml:"name"` // The principals included in the cross-account attachment. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-globalaccelerator-crossaccountattachment.html#cfn-globalaccelerator-crossaccountattachment-principals // Principals *[]*string `field:"optional" json:"principals" yaml:"principals"` // The resources included in the cross-account attachment. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-globalaccelerator-crossaccountattachment.html#cfn-globalaccelerator-crossaccountattachment-resources // Resources interface{} `field:"optional" json:"resources" yaml:"resources"` // Add tags for a cross-account attachment. // // For more information, see [Tagging in AWS Global Accelerator](https://docs.aws.amazon.com/global-accelerator/latest/dg/tagging-in-global-accelerator.html) in the *AWS Global Accelerator Developer Guide* . // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-globalaccelerator-crossaccountattachment.html#cfn-globalaccelerator-crossaccountattachment-tags // Tags *[]*awscdk.CfnTag `field:"optional" json:"tags" yaml:"tags"` }
Properties for defining a `CfnCrossAccountAttachment`.
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" cfnCrossAccountAttachmentProps := &CfnCrossAccountAttachmentProps{ Name: jsii.String("name"), // the properties below are optional Principals: []*string{ jsii.String("principals"), }, Resources: []interface{}{ &ResourceProperty{ EndpointId: jsii.String("endpointId"), // the properties below are optional Region: jsii.String("region"), }, }, Tags: []cfnTag{ &cfnTag{ Key: jsii.String("key"), Value: jsii.String("value"), }, }, }
type CfnCrossAccountAttachment_ResourceProperty ¶ added in v2.138.0
type CfnCrossAccountAttachment_ResourceProperty struct { // The endpoint ID for the endpoint that is specified as a AWS resource. // // An endpoint ID for the cross-account feature is the ARN of an AWS resource, such as a Network Load Balancer, that Global Accelerator supports as an endpoint for an accelerator. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-globalaccelerator-crossaccountattachment-resource.html#cfn-globalaccelerator-crossaccountattachment-resource-endpointid // EndpointId *string `field:"required" json:"endpointId" yaml:"endpointId"` // The AWS Region where a shared endpoint resource is located. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-globalaccelerator-crossaccountattachment-resource.html#cfn-globalaccelerator-crossaccountattachment-resource-region // Region *string `field:"optional" json:"region" yaml:"region"` }
A resource is one of the following: the ARN for an AWS resource that is supported by AWS Global Accelerator to be added as an endpoint, or a CIDR range that specifies a bring your own IP (BYOIP) address pool.
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" resourceProperty := &ResourceProperty{ EndpointId: jsii.String("endpointId"), // the properties below are optional Region: jsii.String("region"), }
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. 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. HealthCheckPath() *string SetHealthCheckPath(val *string) // The port that Global Accelerator uses to perform health checks on endpoints that are part of this endpoint group. HealthCheckPort() *float64 SetHealthCheckPort(val *float64) // The protocol that Global Accelerator uses to perform health checks on endpoints that are part of this endpoint group. 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. 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. ThresholdCount() *float64 SetThresholdCount(val *float64) // The percentage of traffic to send to an AWS Regions . 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. AddDependency(target awscdk.CfnResource) // Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. // Deprecated: use addDependency. 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, typeHint awscdk.ResolutionTypeHint) 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) // Retrieves an array of resources this resource depends on. // // This assembles dependencies on resources across stacks (including nested stacks) // automatically. ObtainDependencies() *[]interface{} // Get a shallow copy of dependencies between this resource and other resources in the same stack. ObtainResourceDependencies() *[]awscdk.CfnResource // Overrides the auto-generated logical ID with a specific ID. OverrideLogicalId(newLogicalId *string) // Indicates that this resource no longer depends on another resource. // // This can be used for resources across stacks (including nested stacks) // and the dependency will automatically be removed from the relevant scope. RemoveDependency(target awscdk.CfnResource) RenderProperties(props *map[string]interface{}) *map[string]interface{} // Replaces one dependency with another. ReplaceDependency(target awscdk.CfnResource, newTarget awscdk.CfnResource) // 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{}) }
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 AttachmentArn: jsii.String("attachmentArn"), 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
type CfnEndpointGroupProps ¶
type CfnEndpointGroupProps struct { // The AWS Regions where the endpoint group is located. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-globalaccelerator-endpointgroup.html#cfn-globalaccelerator-endpointgroup-endpointgroupregion // EndpointGroupRegion *string `field:"required" json:"endpointGroupRegion" yaml:"endpointGroupRegion"` // The Amazon Resource Name (ARN) of the listener. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-globalaccelerator-endpointgroup.html#cfn-globalaccelerator-endpointgroup-listenerarn // ListenerArn *string `field:"required" json:"listenerArn" yaml:"listenerArn"` // The list of endpoint objects. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-globalaccelerator-endpointgroup.html#cfn-globalaccelerator-endpointgroup-endpointconfigurations // 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. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-globalaccelerator-endpointgroup.html#cfn-globalaccelerator-endpointgroup-healthcheckintervalseconds // // Default: - 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 (/). // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-globalaccelerator-endpointgroup.html#cfn-globalaccelerator-endpointgroup-healthcheckpath // // Default: - "/". // 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. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-globalaccelerator-endpointgroup.html#cfn-globalaccelerator-endpointgroup-healthcheckport // // Default: - -1. // 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. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-globalaccelerator-endpointgroup.html#cfn-globalaccelerator-endpointgroup-healthcheckprotocol // // Default: - "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 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. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-globalaccelerator-endpointgroup.html#cfn-globalaccelerator-endpointgroup-portoverrides // 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. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-globalaccelerator-endpointgroup.html#cfn-globalaccelerator-endpointgroup-thresholdcount // // Default: - 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. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-globalaccelerator-endpointgroup.html#cfn-globalaccelerator-endpointgroup-trafficdialpercentage // // Default: - 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 AttachmentArn: jsii.String("attachmentArn"), 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. // // For cross-account endpoints, this must be the ARN of the resource. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-globalaccelerator-endpointgroup-endpointconfiguration.html#cfn-globalaccelerator-endpointgroup-endpointconfiguration-endpointid // EndpointId *string `field:"required" json:"endpointId" yaml:"endpointId"` // The Amazon Resource Name (ARN) of the cross-account attachment that specifies the endpoints (resources) that can be added to accelerators and principals that have permission to add the endpoints. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-globalaccelerator-endpointgroup-endpointconfiguration.html#cfn-globalaccelerator-endpointgroup-endpointconfiguration-attachmentarn // AttachmentArn *string `field:"optional" json:"attachmentArn" yaml:"attachmentArn"` // 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* . // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-globalaccelerator-endpointgroup-endpointconfiguration.html#cfn-globalaccelerator-endpointgroup-endpointconfiguration-clientippreservationenabled // // Default: - true. // 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* . // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-globalaccelerator-endpointgroup-endpointconfiguration.html#cfn-globalaccelerator-endpointgroup-endpointconfiguration-weight // // Default: - 100. // 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 AttachmentArn: jsii.String("attachmentArn"), 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. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-globalaccelerator-endpointgroup-portoverride.html#cfn-globalaccelerator-endpointgroup-portoverride-endpointport // 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. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-globalaccelerator-endpointgroup-portoverride.html#cfn-globalaccelerator-endpointgroup-portoverride-listenerport // 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. 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. AddDependency(target awscdk.CfnResource) // Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. // Deprecated: use addDependency. 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, typeHint awscdk.ResolutionTypeHint) 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) // Retrieves an array of resources this resource depends on. // // This assembles dependencies on resources across stacks (including nested stacks) // automatically. ObtainDependencies() *[]interface{} // Get a shallow copy of dependencies between this resource and other resources in the same stack. ObtainResourceDependencies() *[]awscdk.CfnResource // Overrides the auto-generated logical ID with a specific ID. OverrideLogicalId(newLogicalId *string) // Indicates that this resource no longer depends on another resource. // // This can be used for resources across stacks (including nested stacks) // and the dependency will automatically be removed from the relevant scope. RemoveDependency(target awscdk.CfnResource) RenderProperties(props *map[string]interface{}) *map[string]interface{} // Replaces one dependency with another. ReplaceDependency(target awscdk.CfnResource, newTarget awscdk.CfnResource) // 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{}) }
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
type CfnListenerProps ¶
type CfnListenerProps struct { // The Amazon Resource Name (ARN) of your accelerator. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-globalaccelerator-listener.html#cfn-globalaccelerator-listener-acceleratorarn // AcceleratorArn *string `field:"required" json:"acceleratorArn" yaml:"acceleratorArn"` // The list of port ranges for the connections from clients to the accelerator. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-globalaccelerator-listener.html#cfn-globalaccelerator-listener-portranges // PortRanges interface{} `field:"required" json:"portRanges" yaml:"portRanges"` // The protocol for the connections from clients to the accelerator. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-globalaccelerator-listener.html#cfn-globalaccelerator-listener-protocol // // Default: - "TCP". // 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` . // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-globalaccelerator-listener.html#cfn-globalaccelerator-listener-clientaffinity // // Default: - "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. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-globalaccelerator-listener-portrange.html#cfn-globalaccelerator-listener-portrange-fromport // FromPort *float64 `field:"required" json:"fromPort" yaml:"fromPort"` // The last port in the range of ports, inclusive. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-globalaccelerator-listener-portrange.html#cfn-globalaccelerator-listener-portrange-toport // 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. // Default: - logical ID of the resource. // EndpointGroupName *string `field:"optional" json:"endpointGroupName" yaml:"endpointGroupName"` // Initial list of endpoints for this group. // Default: - Group is initially empty. // Endpoints *[]IEndpoint `field:"optional" json:"endpoints" yaml:"endpoints"` // The time between health checks for each endpoint. // // Must be either 10 or 30 seconds. // Default: Duration.seconds(30) // HealthCheckInterval awscdk.Duration `field:"optional" json:"healthCheckInterval" yaml:"healthCheckInterval"` // The ping path for health checks (if the protocol is HTTP(S)). // Default: '/'. // HealthCheckPath *string `field:"optional" json:"healthCheckPath" yaml:"healthCheckPath"` // The port used to perform health checks. // Default: - The listener's port. // HealthCheckPort *float64 `field:"optional" json:"healthCheckPort" yaml:"healthCheckPort"` // The protocol used to perform health checks. // Default: HealthCheckProtocol.TCP // 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. // Default: 3. // 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. // Default: - No overrides. // PortOverrides *[]*PortOverride `field:"optional" json:"portOverrides" yaml:"portOverrides"` // The AWS Region where the endpoint group is located. // Default: - region of the first endpoint in this group, or the stack region if that region can't be determined. // 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. // Default: 100. // 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. // Default: - logical ID of the resource. // EndpointGroupName *string `field:"optional" json:"endpointGroupName" yaml:"endpointGroupName"` // Initial list of endpoints for this group. // Default: - Group is initially empty. // Endpoints *[]IEndpoint `field:"optional" json:"endpoints" yaml:"endpoints"` // The time between health checks for each endpoint. // // Must be either 10 or 30 seconds. // Default: Duration.seconds(30) // HealthCheckInterval awscdk.Duration `field:"optional" json:"healthCheckInterval" yaml:"healthCheckInterval"` // The ping path for health checks (if the protocol is HTTP(S)). // Default: '/'. // HealthCheckPath *string `field:"optional" json:"healthCheckPath" yaml:"healthCheckPath"` // The port used to perform health checks. // Default: - The listener's port. // HealthCheckPort *float64 `field:"optional" json:"healthCheckPort" yaml:"healthCheckPort"` // The protocol used to perform health checks. // Default: HealthCheckProtocol.TCP // 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. // Default: 3. // 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. // Default: - No overrides. // PortOverrides *[]*PortOverride `field:"optional" json:"portOverrides" yaml:"portOverrides"` // The AWS Region where the endpoint group is located. // Default: - region of the first endpoint in this group, or the stack region if that region can't be determined. // 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. // Default: 100. // 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 DNS name that Global Accelerator creates that points to a dual-stack accelerator's four static IP addresses: two IPv4 addresses and two IPv6 addresses. DualStackDnsName() *string // The array of IPv4 addresses in the IP address set. // // An IP address set can have a maximum of two IP addresses. Ipv4Addresses() *[]*string // The array of IPv6 addresses in the IP address set. // // An IP address set can have a maximum of two IP addresses. Ipv6Addresses() *[]*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 IpAddressType ¶ added in v2.117.0
type IpAddressType string
The IP address type that an accelerator supports.
Example:
accelerator := globalaccelerator.NewAccelerator(this, jsii.String("Accelerator"), &AcceleratorProps{ IpAddresses: []*string{ jsii.String("1.1.1.1"), jsii.String("2.2.2.2"), }, IpAddressType: globalaccelerator.IpAddressType_IPV4, })
const ( // IPV4. IpAddressType_IPV4 IpAddressType = "IPV4" // DUAL_STACK. IpAddressType_DUAL_STACK IpAddressType = "DUAL_STACK" )
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. // Default: ClientAffinity.NONE // ClientAffinity ClientAffinity `field:"optional" json:"clientAffinity" yaml:"clientAffinity"` // Name of the listener. // Default: - logical ID of the resource. // ListenerName *string `field:"optional" json:"listenerName" yaml:"listenerName"` // The protocol for the connections from clients to the accelerator. // Default: ConnectionProtocol.TCP // 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. // Default: ClientAffinity.NONE // ClientAffinity ClientAffinity `field:"optional" json:"clientAffinity" yaml:"clientAffinity"` // Name of the listener. // Default: - logical ID of the resource. // ListenerName *string `field:"optional" json:"listenerName" yaml:"listenerName"` // The protocol for the connections from clients to the accelerator. // Default: ConnectionProtocol.TCP // 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. // Default: - same as `fromPort`. // 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. // Default: true if possible and available. // PreserveClientIp *bool `field:"optional" json:"preserveClientIp" yaml:"preserveClientIp"` // The region where this endpoint is located. // Default: - Unknown what region 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. // Default: 128. // 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 ¶
- Accelerator.go
- AcceleratorAttributes.go
- AcceleratorProps.go
- Accelerator__checks.go
- CfnAccelerator.go
- CfnAcceleratorProps.go
- CfnAccelerator__checks.go
- CfnCrossAccountAttachment.go
- CfnCrossAccountAttachmentProps.go
- CfnCrossAccountAttachment_ResourceProperty.go
- CfnCrossAccountAttachment__checks.go
- CfnEndpointGroup.go
- CfnEndpointGroupProps.go
- CfnEndpointGroup_EndpointConfigurationProperty.go
- CfnEndpointGroup_PortOverrideProperty.go
- CfnEndpointGroup__checks.go
- CfnListener.go
- CfnListenerProps.go
- CfnListener_PortRangeProperty.go
- CfnListener__checks.go
- ClientAffinity.go
- ConnectionProtocol.go
- EndpointGroup.go
- EndpointGroupOptions.go
- EndpointGroupProps.go
- EndpointGroup__checks.go
- HealthCheckProtocol.go
- IAccelerator.go
- IEndpoint.go
- IEndpointGroup.go
- IListener.go
- IpAddressType.go
- Listener.go
- ListenerOptions.go
- ListenerProps.go
- Listener__checks.go
- PortOverride.go
- PortRange.go
- RawEndpoint.go
- RawEndpointProps.go
- RawEndpoint__checks.go
- main.go