Documentation ¶
Index ¶
- func AliasTargetInstance_IsConstruct(x interface{}) *bool
- func AliasTargetInstance_IsOwnedResource(construct constructs.IConstruct) *bool
- func AliasTargetInstance_IsResource(construct constructs.IConstruct) *bool
- func CfnHttpNamespace_CFN_RESOURCE_TYPE_NAME() *string
- func CfnHttpNamespace_IsCfnElement(x interface{}) *bool
- func CfnHttpNamespace_IsCfnResource(construct constructs.IConstruct) *bool
- func CfnHttpNamespace_IsConstruct(x interface{}) *bool
- func CfnInstance_CFN_RESOURCE_TYPE_NAME() *string
- func CfnInstance_IsCfnElement(x interface{}) *bool
- func CfnInstance_IsCfnResource(construct constructs.IConstruct) *bool
- func CfnInstance_IsConstruct(x interface{}) *bool
- func CfnPrivateDnsNamespace_CFN_RESOURCE_TYPE_NAME() *string
- func CfnPrivateDnsNamespace_IsCfnElement(x interface{}) *bool
- func CfnPrivateDnsNamespace_IsCfnResource(construct constructs.IConstruct) *bool
- func CfnPrivateDnsNamespace_IsConstruct(x interface{}) *bool
- func CfnPublicDnsNamespace_CFN_RESOURCE_TYPE_NAME() *string
- func CfnPublicDnsNamespace_IsCfnElement(x interface{}) *bool
- func CfnPublicDnsNamespace_IsCfnResource(construct constructs.IConstruct) *bool
- func CfnPublicDnsNamespace_IsConstruct(x interface{}) *bool
- func CfnService_CFN_RESOURCE_TYPE_NAME() *string
- func CfnService_IsCfnElement(x interface{}) *bool
- func CfnService_IsCfnResource(construct constructs.IConstruct) *bool
- func CfnService_IsConstruct(x interface{}) *bool
- func CnameInstance_IsConstruct(x interface{}) *bool
- func CnameInstance_IsOwnedResource(construct constructs.IConstruct) *bool
- func CnameInstance_IsResource(construct constructs.IConstruct) *bool
- func HttpNamespace_IsConstruct(x interface{}) *bool
- func HttpNamespace_IsOwnedResource(construct constructs.IConstruct) *bool
- func HttpNamespace_IsResource(construct constructs.IConstruct) *bool
- func InstanceBase_IsConstruct(x interface{}) *bool
- func InstanceBase_IsOwnedResource(construct constructs.IConstruct) *bool
- func InstanceBase_IsResource(construct constructs.IConstruct) *bool
- func IpInstance_IsConstruct(x interface{}) *bool
- func IpInstance_IsOwnedResource(construct constructs.IConstruct) *bool
- func IpInstance_IsResource(construct constructs.IConstruct) *bool
- func NewAliasTargetInstance_Override(a AliasTargetInstance, scope constructs.Construct, id *string, ...)
- func NewCfnHttpNamespace_Override(c CfnHttpNamespace, scope constructs.Construct, id *string, ...)
- func NewCfnInstance_Override(c CfnInstance, scope constructs.Construct, id *string, props *CfnInstanceProps)
- func NewCfnPrivateDnsNamespace_Override(c CfnPrivateDnsNamespace, scope constructs.Construct, id *string, ...)
- func NewCfnPublicDnsNamespace_Override(c CfnPublicDnsNamespace, scope constructs.Construct, id *string, ...)
- func NewCfnService_Override(c CfnService, scope constructs.Construct, id *string, props *CfnServiceProps)
- func NewCnameInstance_Override(c CnameInstance, scope constructs.Construct, id *string, ...)
- func NewHttpNamespace_Override(h HttpNamespace, scope constructs.Construct, id *string, ...)
- func NewInstanceBase_Override(i InstanceBase, scope constructs.Construct, id *string, ...)
- func NewIpInstance_Override(i IpInstance, scope constructs.Construct, id *string, props *IpInstanceProps)
- func NewNonIpInstance_Override(n NonIpInstance, scope constructs.Construct, id *string, ...)
- func NewPrivateDnsNamespace_Override(p PrivateDnsNamespace, scope constructs.Construct, id *string, ...)
- func NewPublicDnsNamespace_Override(p PublicDnsNamespace, scope constructs.Construct, id *string, ...)
- func NewService_Override(s Service, scope constructs.Construct, id *string, props *ServiceProps)
- func NonIpInstance_IsConstruct(x interface{}) *bool
- func NonIpInstance_IsOwnedResource(construct constructs.IConstruct) *bool
- func NonIpInstance_IsResource(construct constructs.IConstruct) *bool
- func PrivateDnsNamespace_IsConstruct(x interface{}) *bool
- func PrivateDnsNamespace_IsOwnedResource(construct constructs.IConstruct) *bool
- func PrivateDnsNamespace_IsResource(construct constructs.IConstruct) *bool
- func PublicDnsNamespace_IsConstruct(x interface{}) *bool
- func PublicDnsNamespace_IsOwnedResource(construct constructs.IConstruct) *bool
- func PublicDnsNamespace_IsResource(construct constructs.IConstruct) *bool
- func Service_IsConstruct(x interface{}) *bool
- func Service_IsOwnedResource(construct constructs.IConstruct) *bool
- func Service_IsResource(construct constructs.IConstruct) *bool
- type AliasTargetInstance
- type AliasTargetInstanceProps
- type BaseInstanceProps
- type BaseNamespaceProps
- type BaseServiceProps
- type CfnHttpNamespace
- type CfnHttpNamespaceProps
- type CfnInstance
- type CfnInstanceProps
- type CfnPrivateDnsNamespace
- type CfnPrivateDnsNamespaceProps
- type CfnPrivateDnsNamespace_PrivateDnsPropertiesMutableProperty
- type CfnPrivateDnsNamespace_PropertiesProperty
- type CfnPrivateDnsNamespace_SOAProperty
- type CfnPublicDnsNamespace
- type CfnPublicDnsNamespaceProps
- type CfnPublicDnsNamespace_PropertiesProperty
- type CfnPublicDnsNamespace_PublicDnsPropertiesMutableProperty
- type CfnPublicDnsNamespace_SOAProperty
- type CfnService
- type CfnServiceProps
- type CfnService_DnsConfigProperty
- type CfnService_DnsRecordProperty
- type CfnService_HealthCheckConfigProperty
- type CfnService_HealthCheckCustomConfigProperty
- type CnameInstance
- type CnameInstanceBaseProps
- type CnameInstanceProps
- type DnsRecordType
- type DnsServiceProps
- type HealthCheckConfig
- type HealthCheckCustomConfig
- type HealthCheckType
- type HttpNamespace
- type HttpNamespaceAttributes
- type HttpNamespaceProps
- type IHttpNamespace
- type IInstance
- type INamespace
- type IPrivateDnsNamespace
- type IPublicDnsNamespace
- type IService
- type InstanceBase
- type IpInstance
- type IpInstanceBaseProps
- type IpInstanceProps
- type NamespaceType
- type NonIpInstance
- type NonIpInstanceBaseProps
- type NonIpInstanceProps
- type PrivateDnsNamespace
- type PrivateDnsNamespaceAttributes
- type PrivateDnsNamespaceProps
- type PublicDnsNamespace
- type PublicDnsNamespaceAttributes
- type PublicDnsNamespaceProps
- type RoutingPolicy
- type Service
- type ServiceAttributes
- type ServiceProps
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AliasTargetInstance_IsConstruct ¶
func AliasTargetInstance_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 AliasTargetInstance_IsOwnedResource ¶ added in v2.32.0
func AliasTargetInstance_IsOwnedResource(construct constructs.IConstruct) *bool
Returns true if the construct was created by CDK, and false otherwise.
func AliasTargetInstance_IsResource ¶
func AliasTargetInstance_IsResource(construct constructs.IConstruct) *bool
Check whether the given construct is a Resource.
func CfnHttpNamespace_CFN_RESOURCE_TYPE_NAME ¶
func CfnHttpNamespace_CFN_RESOURCE_TYPE_NAME() *string
func CfnHttpNamespace_IsCfnElement ¶
func CfnHttpNamespace_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 CfnHttpNamespace_IsCfnResource ¶
func CfnHttpNamespace_IsCfnResource(construct constructs.IConstruct) *bool
Check whether the given construct is a CfnResource.
func CfnHttpNamespace_IsConstruct ¶
func CfnHttpNamespace_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 CfnInstance_CFN_RESOURCE_TYPE_NAME ¶
func CfnInstance_CFN_RESOURCE_TYPE_NAME() *string
func CfnInstance_IsCfnElement ¶
func CfnInstance_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 CfnInstance_IsCfnResource ¶
func CfnInstance_IsCfnResource(construct constructs.IConstruct) *bool
Check whether the given construct is a CfnResource.
func CfnInstance_IsConstruct ¶
func CfnInstance_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 CfnPrivateDnsNamespace_CFN_RESOURCE_TYPE_NAME ¶
func CfnPrivateDnsNamespace_CFN_RESOURCE_TYPE_NAME() *string
func CfnPrivateDnsNamespace_IsCfnElement ¶
func CfnPrivateDnsNamespace_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 CfnPrivateDnsNamespace_IsCfnResource ¶
func CfnPrivateDnsNamespace_IsCfnResource(construct constructs.IConstruct) *bool
Check whether the given construct is a CfnResource.
func CfnPrivateDnsNamespace_IsConstruct ¶
func CfnPrivateDnsNamespace_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 CfnPublicDnsNamespace_CFN_RESOURCE_TYPE_NAME ¶
func CfnPublicDnsNamespace_CFN_RESOURCE_TYPE_NAME() *string
func CfnPublicDnsNamespace_IsCfnElement ¶
func CfnPublicDnsNamespace_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 CfnPublicDnsNamespace_IsCfnResource ¶
func CfnPublicDnsNamespace_IsCfnResource(construct constructs.IConstruct) *bool
Check whether the given construct is a CfnResource.
func CfnPublicDnsNamespace_IsConstruct ¶
func CfnPublicDnsNamespace_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 CfnService_CFN_RESOURCE_TYPE_NAME ¶
func CfnService_CFN_RESOURCE_TYPE_NAME() *string
func CfnService_IsCfnElement ¶
func CfnService_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 CfnService_IsCfnResource ¶
func CfnService_IsCfnResource(construct constructs.IConstruct) *bool
Check whether the given construct is a CfnResource.
func CfnService_IsConstruct ¶
func CfnService_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 CnameInstance_IsConstruct ¶
func CnameInstance_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 CnameInstance_IsOwnedResource ¶ added in v2.32.0
func CnameInstance_IsOwnedResource(construct constructs.IConstruct) *bool
Returns true if the construct was created by CDK, and false otherwise.
func CnameInstance_IsResource ¶
func CnameInstance_IsResource(construct constructs.IConstruct) *bool
Check whether the given construct is a Resource.
func HttpNamespace_IsConstruct ¶
func HttpNamespace_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 HttpNamespace_IsOwnedResource ¶ added in v2.32.0
func HttpNamespace_IsOwnedResource(construct constructs.IConstruct) *bool
Returns true if the construct was created by CDK, and false otherwise.
func HttpNamespace_IsResource ¶
func HttpNamespace_IsResource(construct constructs.IConstruct) *bool
Check whether the given construct is a Resource.
func InstanceBase_IsConstruct ¶
func InstanceBase_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 InstanceBase_IsOwnedResource ¶ added in v2.32.0
func InstanceBase_IsOwnedResource(construct constructs.IConstruct) *bool
Returns true if the construct was created by CDK, and false otherwise.
func InstanceBase_IsResource ¶
func InstanceBase_IsResource(construct constructs.IConstruct) *bool
Check whether the given construct is a Resource.
func IpInstance_IsConstruct ¶
func IpInstance_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 IpInstance_IsOwnedResource ¶ added in v2.32.0
func IpInstance_IsOwnedResource(construct constructs.IConstruct) *bool
Returns true if the construct was created by CDK, and false otherwise.
func IpInstance_IsResource ¶
func IpInstance_IsResource(construct constructs.IConstruct) *bool
Check whether the given construct is a Resource.
func NewAliasTargetInstance_Override ¶
func NewAliasTargetInstance_Override(a AliasTargetInstance, scope constructs.Construct, id *string, props *AliasTargetInstanceProps)
func NewCfnHttpNamespace_Override ¶
func NewCfnHttpNamespace_Override(c CfnHttpNamespace, scope constructs.Construct, id *string, props *CfnHttpNamespaceProps)
Create a new `AWS::ServiceDiscovery::HttpNamespace`.
func NewCfnInstance_Override ¶
func NewCfnInstance_Override(c CfnInstance, scope constructs.Construct, id *string, props *CfnInstanceProps)
Create a new `AWS::ServiceDiscovery::Instance`.
func NewCfnPrivateDnsNamespace_Override ¶
func NewCfnPrivateDnsNamespace_Override(c CfnPrivateDnsNamespace, scope constructs.Construct, id *string, props *CfnPrivateDnsNamespaceProps)
Create a new `AWS::ServiceDiscovery::PrivateDnsNamespace`.
func NewCfnPublicDnsNamespace_Override ¶
func NewCfnPublicDnsNamespace_Override(c CfnPublicDnsNamespace, scope constructs.Construct, id *string, props *CfnPublicDnsNamespaceProps)
Create a new `AWS::ServiceDiscovery::PublicDnsNamespace`.
func NewCfnService_Override ¶
func NewCfnService_Override(c CfnService, scope constructs.Construct, id *string, props *CfnServiceProps)
Create a new `AWS::ServiceDiscovery::Service`.
func NewCnameInstance_Override ¶
func NewCnameInstance_Override(c CnameInstance, scope constructs.Construct, id *string, props *CnameInstanceProps)
func NewHttpNamespace_Override ¶
func NewHttpNamespace_Override(h HttpNamespace, scope constructs.Construct, id *string, props *HttpNamespaceProps)
func NewInstanceBase_Override ¶
func NewInstanceBase_Override(i InstanceBase, scope constructs.Construct, id *string, props *awscdk.ResourceProps)
func NewIpInstance_Override ¶
func NewIpInstance_Override(i IpInstance, scope constructs.Construct, id *string, props *IpInstanceProps)
func NewNonIpInstance_Override ¶
func NewNonIpInstance_Override(n NonIpInstance, scope constructs.Construct, id *string, props *NonIpInstanceProps)
func NewPrivateDnsNamespace_Override ¶
func NewPrivateDnsNamespace_Override(p PrivateDnsNamespace, scope constructs.Construct, id *string, props *PrivateDnsNamespaceProps)
func NewPublicDnsNamespace_Override ¶
func NewPublicDnsNamespace_Override(p PublicDnsNamespace, scope constructs.Construct, id *string, props *PublicDnsNamespaceProps)
func NewService_Override ¶
func NewService_Override(s Service, scope constructs.Construct, id *string, props *ServiceProps)
func NonIpInstance_IsConstruct ¶
func NonIpInstance_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 NonIpInstance_IsOwnedResource ¶ added in v2.32.0
func NonIpInstance_IsOwnedResource(construct constructs.IConstruct) *bool
Returns true if the construct was created by CDK, and false otherwise.
func NonIpInstance_IsResource ¶
func NonIpInstance_IsResource(construct constructs.IConstruct) *bool
Check whether the given construct is a Resource.
func PrivateDnsNamespace_IsConstruct ¶
func PrivateDnsNamespace_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 PrivateDnsNamespace_IsOwnedResource ¶ added in v2.32.0
func PrivateDnsNamespace_IsOwnedResource(construct constructs.IConstruct) *bool
Returns true if the construct was created by CDK, and false otherwise.
func PrivateDnsNamespace_IsResource ¶
func PrivateDnsNamespace_IsResource(construct constructs.IConstruct) *bool
Check whether the given construct is a Resource.
func PublicDnsNamespace_IsConstruct ¶
func PublicDnsNamespace_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 PublicDnsNamespace_IsOwnedResource ¶ added in v2.32.0
func PublicDnsNamespace_IsOwnedResource(construct constructs.IConstruct) *bool
Returns true if the construct was created by CDK, and false otherwise.
func PublicDnsNamespace_IsResource ¶
func PublicDnsNamespace_IsResource(construct constructs.IConstruct) *bool
Check whether the given construct is a Resource.
func Service_IsConstruct ¶
func Service_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 Service_IsOwnedResource ¶ added in v2.32.0
func Service_IsOwnedResource(construct constructs.IConstruct) *bool
Returns true if the construct was created by CDK, and false otherwise.
func Service_IsResource ¶
func Service_IsResource(construct constructs.IConstruct) *bool
Check whether the given construct is a Resource.
Types ¶
type AliasTargetInstance ¶
type AliasTargetInstance interface { InstanceBase // The Route53 DNS name of the alias target. DnsName() *string // The environment this resource belongs to. // // For resources that are created and managed by the CDK // (generally, those created by creating new class instances like Role, Bucket, etc.), // this is always the same as the environment of the stack they belong to; // however, for imported resources // (those obtained from static methods like fromRoleArn, fromBucketName, etc.), // that might be different than the stack they were imported into. Env() *awscdk.ResourceEnvironment // The Id of the instance. InstanceId() *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 Cloudmap service to which the instance is registered. Service() IService // The stack in which this resource is defined. Stack() awscdk.Stack // 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 // Generate a unique instance Id that is safe to pass to CloudMap. UniqueInstanceId() *string }
Instance that uses Route 53 Alias record type.
Currently, the only resource types supported are Elastic Load Balancers.
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 service service aliasTargetInstance := awscdk.Aws_servicediscovery.NewAliasTargetInstance(this, jsii.String("MyAliasTargetInstance"), &aliasTargetInstanceProps{ dnsName: jsii.String("dnsName"), service: service, // the properties below are optional customAttributes: map[string]*string{ "customAttributesKey": jsii.String("customAttributes"), }, instanceId: jsii.String("instanceId"), })
func NewAliasTargetInstance ¶
func NewAliasTargetInstance(scope constructs.Construct, id *string, props *AliasTargetInstanceProps) AliasTargetInstance
type AliasTargetInstanceProps ¶
type AliasTargetInstanceProps struct { // Custom attributes of the instance. CustomAttributes *map[string]*string `field:"optional" json:"customAttributes" yaml:"customAttributes"` // The id of the instance resource. InstanceId *string `field:"optional" json:"instanceId" yaml:"instanceId"` // DNS name of the target. DnsName *string `field:"required" json:"dnsName" yaml:"dnsName"` // The Cloudmap service this resource is registered to. Service IService `field:"required" json:"service" yaml:"service"` }
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 service service aliasTargetInstanceProps := &aliasTargetInstanceProps{ dnsName: jsii.String("dnsName"), service: service, // the properties below are optional customAttributes: map[string]*string{ "customAttributesKey": jsii.String("customAttributes"), }, instanceId: jsii.String("instanceId"), }
type BaseInstanceProps ¶
type BaseInstanceProps struct { // Custom attributes of the instance. CustomAttributes *map[string]*string `field:"optional" json:"customAttributes" yaml:"customAttributes"` // The id of the instance resource. InstanceId *string `field:"optional" json:"instanceId" yaml:"instanceId"` }
Used when the resource that's associated with the service instance is accessible using values other than an IP address or a domain name (CNAME), i.e. for non-ip-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" baseInstanceProps := &baseInstanceProps{ customAttributes: map[string]*string{ "customAttributesKey": jsii.String("customAttributes"), }, instanceId: jsii.String("instanceId"), }
type BaseNamespaceProps ¶
type BaseNamespaceProps struct { // A name for the Namespace. Name *string `field:"required" json:"name" yaml:"name"` // A description of the Namespace. Description *string `field:"optional" json:"description" yaml:"description"` }
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" baseNamespaceProps := &baseNamespaceProps{ name: jsii.String("name"), // the properties below are optional description: jsii.String("description"), }
type BaseServiceProps ¶
type BaseServiceProps struct { // Structure containing failure threshold for a custom health checker. // // Only one of healthCheckConfig or healthCheckCustomConfig can be specified. // See: https://docs.aws.amazon.com/cloud-map/latest/api/API_HealthCheckCustomConfig.html CustomHealthCheck *HealthCheckCustomConfig `field:"optional" json:"customHealthCheck" yaml:"customHealthCheck"` // A description of the service. Description *string `field:"optional" json:"description" yaml:"description"` // Settings for an optional health check. // // If you specify health check settings, AWS Cloud Map associates the health // check with the records that you specify in DnsConfig. Only one of healthCheckConfig or healthCheckCustomConfig can // be specified. Not valid for PrivateDnsNamespaces. If you use healthCheck, you can only register IP instances to // this service. HealthCheck *HealthCheckConfig `field:"optional" json:"healthCheck" yaml:"healthCheck"` // A name for the Service. Name *string `field:"optional" json:"name" yaml:"name"` }
Basic props needed to create a service in a given namespace.
Used by HttpNamespace.createService ¶
Example:
import cdk "github.com/aws/aws-cdk-go/awscdk" import servicediscovery "github.com/aws/aws-cdk-go/awscdk" app := cdk.NewApp() stack := cdk.NewStack(app, jsii.String("aws-servicediscovery-integ")) namespace := servicediscovery.NewHttpNamespace(stack, jsii.String("MyNamespace"), &httpNamespaceProps{ name: jsii.String("MyHTTPNamespace"), }) service1 := namespace.createService(jsii.String("NonIpService"), &baseServiceProps{ description: jsii.String("service registering non-ip instances"), }) service1.registerNonIpInstance(jsii.String("NonIpInstance"), &nonIpInstanceBaseProps{ customAttributes: map[string]*string{ "arn": jsii.String("arn:aws:s3:::mybucket"), }, }) service2 := namespace.createService(jsii.String("IpService"), &baseServiceProps{ description: jsii.String("service registering ip instances"), healthCheck: &healthCheckConfig{ type: servicediscovery.healthCheckType_HTTP, resourcePath: jsii.String("/check"), }, }) service2.registerIpInstance(jsii.String("IpInstance"), &ipInstanceBaseProps{ ipv4: jsii.String("54.239.25.192"), }) app.synth()
type CfnHttpNamespace ¶
type CfnHttpNamespace interface { awscdk.CfnResource awscdk.IInspectable // The Amazon Resource Name (ARN) of the namespace, such as `arn:aws:service-discovery:us-east-1:123456789012:http-namespace/http-namespace-a1bzhi` . AttrArn() *string // The ID of the namespace. AttrId() *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 // A description for the namespace. Description() *string SetDescription(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 that you want to assign to this namespace. 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 // The tags for the namespace. // // Each tag consists of a key and an optional value, both of which you define. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters. Tags() awscdk.TagManager // Deprecated. // Deprecated: use `updatedProperties` // // Return properties modified after initiation // // Resources that expose mutable properties should override this function to // collect and return the properties object for this resource. UpdatedProperites() *map[string]interface{} // Return properties modified after initiation. // // Resources that expose mutable properties should override this function to // collect and return the properties object for this resource. UpdatedProperties() *map[string]interface{} // Syntactic sugar for `addOverride(path, undefined)`. AddDeletionOverride(path *string) // Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. // // This can be used for resources across stacks (or nested stack) boundaries // and the dependency will automatically be transferred to the relevant scope. AddDependsOn(target awscdk.CfnResource) // Add a value to the CloudFormation Resource Metadata. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html // // Note that this is a different set of metadata from CDK node metadata; this // metadata ends up in the stack template under the resource, whereas CDK // node metadata ends up in the Cloud Assembly. // AddMetadata(key *string, value interface{}) // Adds an override to the synthesized CloudFormation resource. // // To add a // property override, either use `addPropertyOverride` or prefix `path` with // "Properties." (i.e. `Properties.TopicName`). // // If the override is nested, separate each nested level using a dot (.) in the path parameter. // If there is an array as part of the nesting, specify the index in the path. // // To include a literal `.` in the property name, prefix with a `\`. In most // programming languages you will need to write this as `"\\."` because the // `\` itself will need to be escaped. // // For example, // “`typescript // cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']); // cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE'); // “` // would add the overrides // “`json // "Properties": { // "GlobalSecondaryIndexes": [ // { // "Projection": { // "NonKeyAttributes": [ "myattribute" ] // ... // } // ... // }, // { // "ProjectionType": "INCLUDE" // ... // }, // ] // ... // } // “` // // The `value` argument to `addOverride` will not be processed or translated // in any way. Pass raw JSON values in here with the correct capitalization // for CloudFormation. If you pass CDK classes or structs, they will be // rendered with lowercased key names, and CloudFormation will reject the // template. AddOverride(path *string, value interface{}) // Adds an override that deletes the value of a property from the resource definition. AddPropertyDeletionOverride(propertyPath *string) // Adds an override to a resource property. // // Syntactic sugar for `addOverride("Properties.<...>", value)`. AddPropertyOverride(propertyPath *string, value interface{}) // Sets the deletion policy of the resource based on the removal policy specified. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). In some // cases, a snapshot can be taken of the resource prior to deletion // (`RemovalPolicy.SNAPSHOT`). A list of resources that support this policy // can be found in the following link:. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html#aws-attribute-deletionpolicy-options // ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions) // Returns a token for an runtime attribute of this resource. // // Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility // in case there is no generated attribute. GetAtt(attributeName *string) awscdk.Reference // Retrieve a value value from the CloudFormation Resource Metadata. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html // // Note that this is a different set of metadata from CDK node metadata; this // metadata ends up in the stack template under the resource, whereas CDK // node metadata ends up in the Cloud Assembly. // GetMetadata(key *string) interface{} // Examines the CloudFormation resource and discloses attributes. Inspect(inspector awscdk.TreeInspector) // Overrides the auto-generated logical ID with a specific ID. OverrideLogicalId(newLogicalId *string) RenderProperties(props *map[string]interface{}) *map[string]interface{} // Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template. // // Returns: `true` if the resource should be included or `false` is the resource // should be omitted. ShouldSynthesize() *bool // Returns a string representation of this construct. // // Returns: a string representation of this resource. ToString() *string ValidateProperties(_properties interface{}) }
A CloudFormation `AWS::ServiceDiscovery::HttpNamespace`.
The `HttpNamespace` resource is an AWS Cloud Map resource type that contains information about an HTTP namespace. Service instances that you register using an HTTP namespace can be discovered using a `DiscoverInstances` request but can't be discovered using DNS.
For the current quota on the number of namespaces that you can create using the same AWS account, see [AWS Cloud Map quotas](https://docs.aws.amazon.com/cloud-map/latest/dg/cloud-map-limits.html) in the ** .
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" cfnHttpNamespace := awscdk.Aws_servicediscovery.NewCfnHttpNamespace(this, jsii.String("MyCfnHttpNamespace"), &cfnHttpNamespaceProps{ name: jsii.String("name"), // the properties below are optional description: jsii.String("description"), tags: []cfnTag{ &cfnTag{ key: jsii.String("key"), value: jsii.String("value"), }, }, })
func NewCfnHttpNamespace ¶
func NewCfnHttpNamespace(scope constructs.Construct, id *string, props *CfnHttpNamespaceProps) CfnHttpNamespace
Create a new `AWS::ServiceDiscovery::HttpNamespace`.
type CfnHttpNamespaceProps ¶
type CfnHttpNamespaceProps struct { // The name that you want to assign to this namespace. Name *string `field:"required" json:"name" yaml:"name"` // A description for the namespace. Description *string `field:"optional" json:"description" yaml:"description"` // The tags for the namespace. // // Each tag consists of a key and an optional value, both of which you define. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters. Tags *[]*awscdk.CfnTag `field:"optional" json:"tags" yaml:"tags"` }
Properties for defining a `CfnHttpNamespace`.
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" cfnHttpNamespaceProps := &cfnHttpNamespaceProps{ name: jsii.String("name"), // the properties below are optional description: jsii.String("description"), tags: []cfnTag{ &cfnTag{ key: jsii.String("key"), value: jsii.String("value"), }, }, }
type CfnInstance ¶
type CfnInstance interface { awscdk.CfnResource awscdk.IInspectable // 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 // A string map that contains the following information for the service that you specify in `ServiceId` :. // // - The attributes that apply to the records that are defined in the service. // - For each attribute, the applicable value. // // Supported attribute keys include the following: // // - **AWS_ALIAS_DNS_NAME** - If you want AWS Cloud Map to create a Route 53 alias record that routes traffic to an Elastic Load Balancing load balancer, specify the DNS name that is associated with the load balancer. For information about how to get the DNS name, see [AliasTarget->DNSName](https://docs.aws.amazon.com/Route53/latest/APIReference/API_AliasTarget.html#Route53-Type-AliasTarget-DNSName) in the *Route 53 API Reference* . // // Note the following: // // - The configuration for the service that is specified by `ServiceId` must include settings for an `A` record, an `AAAA` record, or both. // - In the service that is specified by `ServiceId` , the value of `RoutingPolicy` must be `WEIGHTED` . // - If the service that is specified by `ServiceId` includes `HealthCheckConfig` settings, AWS Cloud Map will create the health check, but it won't associate the health check with the alias record. // - Auto naming currently doesn't support creating alias records that route traffic to AWS resources other than ELB load balancers. // - If you specify a value for `AWS_ALIAS_DNS_NAME` , don't specify values for any of the `AWS_INSTANCE` attributes. // - **AWS_EC2_INSTANCE_ID** - *HTTP namespaces only.* The Amazon EC2 instance ID for the instance. The `AWS_INSTANCE_IPV4` attribute contains the primary private IPv4 address. When creating resources with a type of [AWS::ServiceDiscovery::Instance](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-servicediscovery-instance.html) , if the `AWS_EC2_INSTANCE_ID` attribute is specified, the only other attribute that can be specified is `AWS_INIT_HEALTH_STATUS` . After the resource has been created, the `AWS_INSTANCE_IPV4` attribute contains the primary private IPv4 address. // - **AWS_INIT_HEALTH_STATUS** - If the service configuration includes `HealthCheckCustomConfig` , when creating resources with a type of [AWS::ServiceDiscovery::Instance](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-servicediscovery-instance.html) you can optionally use `AWS_INIT_HEALTH_STATUS` to specify the initial status of the custom health check, `HEALTHY` or `UNHEALTHY` . If you don't specify a value for `AWS_INIT_HEALTH_STATUS` , the initial status is `HEALTHY` . This attribute can only be used when creating resources and will not be seen on existing resources. // - **AWS_INSTANCE_CNAME** - If the service configuration includes a `CNAME` record, the domain name that you want Route 53 to return in response to DNS queries, for example, `example.com` . // // This value is required if the service specified by `ServiceId` includes settings for an `CNAME` record. // - **AWS_INSTANCE_IPV4** - If the service configuration includes an `A` record, the IPv4 address that you want Route 53 to return in response to DNS queries, for example, `192.0.2.44` . // // This value is required if the service specified by `ServiceId` includes settings for an `A` record. If the service includes settings for an `SRV` record, you must specify a value for `AWS_INSTANCE_IPV4` , `AWS_INSTANCE_IPV6` , or both. // - **AWS_INSTANCE_IPV6** - If the service configuration includes an `AAAA` record, the IPv6 address that you want Route 53 to return in response to DNS queries, for example, `2001:0db8:85a3:0000:0000:abcd:0001:2345` . // // This value is required if the service specified by `ServiceId` includes settings for an `AAAA` record. If the service includes settings for an `SRV` record, you must specify a value for `AWS_INSTANCE_IPV4` , `AWS_INSTANCE_IPV6` , or both. // - **AWS_INSTANCE_PORT** - If the service includes an `SRV` record, the value that you want Route 53 to return for the port. // // If the service includes `HealthCheckConfig` , the port on the endpoint that you want Route 53 to send requests to. // // This value is required if you specified settings for an `SRV` record or a Route 53 health check when you created the service. InstanceAttributes() interface{} SetInstanceAttributes(val interface{}) // An identifier that you want to associate with the instance. Note the following:. // // - If the service that's specified by `ServiceId` includes settings for an `SRV` record, the value of `InstanceId` is automatically included as part of the value for the `SRV` record. For more information, see [DnsRecord > Type](https://docs.aws.amazon.com/cloud-map/latest/api/API_DnsRecord.html#cloudmap-Type-DnsRecord-Type) . // - You can use this value to update an existing instance. // - To register a new instance, you must specify a value that's unique among instances that you register by using the same service. // - If you specify an existing `InstanceId` and `ServiceId` , AWS Cloud Map updates the existing DNS records, if any. If there's also an existing health check, AWS Cloud Map deletes the old health check and creates a new one. // // > The health check isn't deleted immediately, so it will still appear for a while if you submit a `ListHealthChecks` request, for example. InstanceId() *string SetInstanceId(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 // 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 ID of the service that you want to use for settings for the instance. ServiceId() *string SetServiceId(val *string) // The stack in which this element is defined. // // CfnElements must be defined within a stack scope (directly or indirectly). Stack() awscdk.Stack // Deprecated. // Deprecated: use `updatedProperties` // // Return properties modified after initiation // // Resources that expose mutable properties should override this function to // collect and return the properties object for this resource. UpdatedProperites() *map[string]interface{} // Return properties modified after initiation. // // Resources that expose mutable properties should override this function to // collect and return the properties object for this resource. UpdatedProperties() *map[string]interface{} // Syntactic sugar for `addOverride(path, undefined)`. AddDeletionOverride(path *string) // Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. // // This can be used for resources across stacks (or nested stack) boundaries // and the dependency will automatically be transferred to the relevant scope. AddDependsOn(target awscdk.CfnResource) // Add a value to the CloudFormation Resource Metadata. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html // // Note that this is a different set of metadata from CDK node metadata; this // metadata ends up in the stack template under the resource, whereas CDK // node metadata ends up in the Cloud Assembly. // AddMetadata(key *string, value interface{}) // Adds an override to the synthesized CloudFormation resource. // // To add a // property override, either use `addPropertyOverride` or prefix `path` with // "Properties." (i.e. `Properties.TopicName`). // // If the override is nested, separate each nested level using a dot (.) in the path parameter. // If there is an array as part of the nesting, specify the index in the path. // // To include a literal `.` in the property name, prefix with a `\`. In most // programming languages you will need to write this as `"\\."` because the // `\` itself will need to be escaped. // // For example, // “`typescript // cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']); // cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE'); // “` // would add the overrides // “`json // "Properties": { // "GlobalSecondaryIndexes": [ // { // "Projection": { // "NonKeyAttributes": [ "myattribute" ] // ... // } // ... // }, // { // "ProjectionType": "INCLUDE" // ... // }, // ] // ... // } // “` // // The `value` argument to `addOverride` will not be processed or translated // in any way. Pass raw JSON values in here with the correct capitalization // for CloudFormation. If you pass CDK classes or structs, they will be // rendered with lowercased key names, and CloudFormation will reject the // template. AddOverride(path *string, value interface{}) // Adds an override that deletes the value of a property from the resource definition. AddPropertyDeletionOverride(propertyPath *string) // Adds an override to a resource property. // // Syntactic sugar for `addOverride("Properties.<...>", value)`. AddPropertyOverride(propertyPath *string, value interface{}) // Sets the deletion policy of the resource based on the removal policy specified. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). In some // cases, a snapshot can be taken of the resource prior to deletion // (`RemovalPolicy.SNAPSHOT`). A list of resources that support this policy // can be found in the following link:. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html#aws-attribute-deletionpolicy-options // ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions) // Returns a token for an runtime attribute of this resource. // // Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility // in case there is no generated attribute. GetAtt(attributeName *string) awscdk.Reference // Retrieve a value value from the CloudFormation Resource Metadata. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html // // Note that this is a different set of metadata from CDK node metadata; this // metadata ends up in the stack template under the resource, whereas CDK // node metadata ends up in the Cloud Assembly. // GetMetadata(key *string) interface{} // Examines the CloudFormation resource and discloses attributes. Inspect(inspector awscdk.TreeInspector) // Overrides the auto-generated logical ID with a specific ID. OverrideLogicalId(newLogicalId *string) RenderProperties(props *map[string]interface{}) *map[string]interface{} // Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template. // // Returns: `true` if the resource should be included or `false` is the resource // should be omitted. ShouldSynthesize() *bool // Returns a string representation of this construct. // // Returns: a string representation of this resource. ToString() *string ValidateProperties(_properties interface{}) }
A CloudFormation `AWS::ServiceDiscovery::Instance`.
A complex type that contains information about an instance that AWS Cloud Map creates when you submit a `RegisterInstance` request.
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 instanceAttributes interface{} cfnInstance := awscdk.Aws_servicediscovery.NewCfnInstance(this, jsii.String("MyCfnInstance"), &cfnInstanceProps{ instanceAttributes: instanceAttributes, serviceId: jsii.String("serviceId"), // the properties below are optional instanceId: jsii.String("instanceId"), })
func NewCfnInstance ¶
func NewCfnInstance(scope constructs.Construct, id *string, props *CfnInstanceProps) CfnInstance
Create a new `AWS::ServiceDiscovery::Instance`.
type CfnInstanceProps ¶
type CfnInstanceProps struct { // A string map that contains the following information for the service that you specify in `ServiceId` :. // // - The attributes that apply to the records that are defined in the service. // - For each attribute, the applicable value. // // Supported attribute keys include the following: // // - **AWS_ALIAS_DNS_NAME** - If you want AWS Cloud Map to create a Route 53 alias record that routes traffic to an Elastic Load Balancing load balancer, specify the DNS name that is associated with the load balancer. For information about how to get the DNS name, see [AliasTarget->DNSName](https://docs.aws.amazon.com/Route53/latest/APIReference/API_AliasTarget.html#Route53-Type-AliasTarget-DNSName) in the *Route 53 API Reference* . // // Note the following: // // - The configuration for the service that is specified by `ServiceId` must include settings for an `A` record, an `AAAA` record, or both. // - In the service that is specified by `ServiceId` , the value of `RoutingPolicy` must be `WEIGHTED` . // - If the service that is specified by `ServiceId` includes `HealthCheckConfig` settings, AWS Cloud Map will create the health check, but it won't associate the health check with the alias record. // - Auto naming currently doesn't support creating alias records that route traffic to AWS resources other than ELB load balancers. // - If you specify a value for `AWS_ALIAS_DNS_NAME` , don't specify values for any of the `AWS_INSTANCE` attributes. // - **AWS_EC2_INSTANCE_ID** - *HTTP namespaces only.* The Amazon EC2 instance ID for the instance. The `AWS_INSTANCE_IPV4` attribute contains the primary private IPv4 address. When creating resources with a type of [AWS::ServiceDiscovery::Instance](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-servicediscovery-instance.html) , if the `AWS_EC2_INSTANCE_ID` attribute is specified, the only other attribute that can be specified is `AWS_INIT_HEALTH_STATUS` . After the resource has been created, the `AWS_INSTANCE_IPV4` attribute contains the primary private IPv4 address. // - **AWS_INIT_HEALTH_STATUS** - If the service configuration includes `HealthCheckCustomConfig` , when creating resources with a type of [AWS::ServiceDiscovery::Instance](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-servicediscovery-instance.html) you can optionally use `AWS_INIT_HEALTH_STATUS` to specify the initial status of the custom health check, `HEALTHY` or `UNHEALTHY` . If you don't specify a value for `AWS_INIT_HEALTH_STATUS` , the initial status is `HEALTHY` . This attribute can only be used when creating resources and will not be seen on existing resources. // - **AWS_INSTANCE_CNAME** - If the service configuration includes a `CNAME` record, the domain name that you want Route 53 to return in response to DNS queries, for example, `example.com` . // // This value is required if the service specified by `ServiceId` includes settings for an `CNAME` record. // - **AWS_INSTANCE_IPV4** - If the service configuration includes an `A` record, the IPv4 address that you want Route 53 to return in response to DNS queries, for example, `192.0.2.44` . // // This value is required if the service specified by `ServiceId` includes settings for an `A` record. If the service includes settings for an `SRV` record, you must specify a value for `AWS_INSTANCE_IPV4` , `AWS_INSTANCE_IPV6` , or both. // - **AWS_INSTANCE_IPV6** - If the service configuration includes an `AAAA` record, the IPv6 address that you want Route 53 to return in response to DNS queries, for example, `2001:0db8:85a3:0000:0000:abcd:0001:2345` . // // This value is required if the service specified by `ServiceId` includes settings for an `AAAA` record. If the service includes settings for an `SRV` record, you must specify a value for `AWS_INSTANCE_IPV4` , `AWS_INSTANCE_IPV6` , or both. // - **AWS_INSTANCE_PORT** - If the service includes an `SRV` record, the value that you want Route 53 to return for the port. // // If the service includes `HealthCheckConfig` , the port on the endpoint that you want Route 53 to send requests to. // // This value is required if you specified settings for an `SRV` record or a Route 53 health check when you created the service. InstanceAttributes interface{} `field:"required" json:"instanceAttributes" yaml:"instanceAttributes"` // The ID of the service that you want to use for settings for the instance. ServiceId *string `field:"required" json:"serviceId" yaml:"serviceId"` // An identifier that you want to associate with the instance. Note the following:. // // - If the service that's specified by `ServiceId` includes settings for an `SRV` record, the value of `InstanceId` is automatically included as part of the value for the `SRV` record. For more information, see [DnsRecord > Type](https://docs.aws.amazon.com/cloud-map/latest/api/API_DnsRecord.html#cloudmap-Type-DnsRecord-Type) . // - You can use this value to update an existing instance. // - To register a new instance, you must specify a value that's unique among instances that you register by using the same service. // - If you specify an existing `InstanceId` and `ServiceId` , AWS Cloud Map updates the existing DNS records, if any. If there's also an existing health check, AWS Cloud Map deletes the old health check and creates a new one. // // > The health check isn't deleted immediately, so it will still appear for a while if you submit a `ListHealthChecks` request, for example. InstanceId *string `field:"optional" json:"instanceId" yaml:"instanceId"` }
Properties for defining a `CfnInstance`.
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 instanceAttributes interface{} cfnInstanceProps := &cfnInstanceProps{ instanceAttributes: instanceAttributes, serviceId: jsii.String("serviceId"), // the properties below are optional instanceId: jsii.String("instanceId"), }
type CfnPrivateDnsNamespace ¶
type CfnPrivateDnsNamespace interface { awscdk.CfnResource awscdk.IInspectable // The Amazon Resource Name (ARN) of the private namespace. AttrArn() *string // The ID for the Route 53 hosted zone that AWS Cloud Map creates when you create a namespace. AttrHostedZoneId() *string // The ID of the private namespace. AttrId() *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 // A description for the namespace. Description() *string SetDescription(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 that you want to assign to this namespace. // // When you create a private DNS namespace, AWS Cloud Map automatically creates an Amazon Route 53 private hosted zone that has the same name as the namespace. Name() *string SetName(val *string) // The tree node. Node() constructs.Node // Properties for the private DNS namespace. Properties() interface{} SetProperties(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 tags for the namespace. // // Each tag consists of a key and an optional value, both of which you define. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters. Tags() awscdk.TagManager // Deprecated. // Deprecated: use `updatedProperties` // // Return properties modified after initiation // // Resources that expose mutable properties should override this function to // collect and return the properties object for this resource. UpdatedProperites() *map[string]interface{} // Return properties modified after initiation. // // Resources that expose mutable properties should override this function to // collect and return the properties object for this resource. UpdatedProperties() *map[string]interface{} // The ID of the Amazon VPC that you want to associate the namespace with. Vpc() *string SetVpc(val *string) // Syntactic sugar for `addOverride(path, undefined)`. AddDeletionOverride(path *string) // Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. // // This can be used for resources across stacks (or nested stack) boundaries // and the dependency will automatically be transferred to the relevant scope. AddDependsOn(target awscdk.CfnResource) // Add a value to the CloudFormation Resource Metadata. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html // // Note that this is a different set of metadata from CDK node metadata; this // metadata ends up in the stack template under the resource, whereas CDK // node metadata ends up in the Cloud Assembly. // AddMetadata(key *string, value interface{}) // Adds an override to the synthesized CloudFormation resource. // // To add a // property override, either use `addPropertyOverride` or prefix `path` with // "Properties." (i.e. `Properties.TopicName`). // // If the override is nested, separate each nested level using a dot (.) in the path parameter. // If there is an array as part of the nesting, specify the index in the path. // // To include a literal `.` in the property name, prefix with a `\`. In most // programming languages you will need to write this as `"\\."` because the // `\` itself will need to be escaped. // // For example, // “`typescript // cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']); // cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE'); // “` // would add the overrides // “`json // "Properties": { // "GlobalSecondaryIndexes": [ // { // "Projection": { // "NonKeyAttributes": [ "myattribute" ] // ... // } // ... // }, // { // "ProjectionType": "INCLUDE" // ... // }, // ] // ... // } // “` // // The `value` argument to `addOverride` will not be processed or translated // in any way. Pass raw JSON values in here with the correct capitalization // for CloudFormation. If you pass CDK classes or structs, they will be // rendered with lowercased key names, and CloudFormation will reject the // template. AddOverride(path *string, value interface{}) // Adds an override that deletes the value of a property from the resource definition. AddPropertyDeletionOverride(propertyPath *string) // Adds an override to a resource property. // // Syntactic sugar for `addOverride("Properties.<...>", value)`. AddPropertyOverride(propertyPath *string, value interface{}) // Sets the deletion policy of the resource based on the removal policy specified. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). In some // cases, a snapshot can be taken of the resource prior to deletion // (`RemovalPolicy.SNAPSHOT`). A list of resources that support this policy // can be found in the following link:. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html#aws-attribute-deletionpolicy-options // ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions) // Returns a token for an runtime attribute of this resource. // // Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility // in case there is no generated attribute. GetAtt(attributeName *string) awscdk.Reference // Retrieve a value value from the CloudFormation Resource Metadata. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html // // Note that this is a different set of metadata from CDK node metadata; this // metadata ends up in the stack template under the resource, whereas CDK // node metadata ends up in the Cloud Assembly. // GetMetadata(key *string) interface{} // Examines the CloudFormation resource and discloses attributes. Inspect(inspector awscdk.TreeInspector) // Overrides the auto-generated logical ID with a specific ID. OverrideLogicalId(newLogicalId *string) RenderProperties(props *map[string]interface{}) *map[string]interface{} // Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template. // // Returns: `true` if the resource should be included or `false` is the resource // should be omitted. ShouldSynthesize() *bool // Returns a string representation of this construct. // // Returns: a string representation of this resource. ToString() *string ValidateProperties(_properties interface{}) }
A CloudFormation `AWS::ServiceDiscovery::PrivateDnsNamespace`.
Creates a private namespace based on DNS, which is visible only inside a specified Amazon VPC. The namespace defines your service naming scheme. For example, if you name your namespace `example.com` and name your service `backend` , the resulting DNS name for the service is `backend.example.com` . Service instances that are registered using a private DNS namespace can be discovered using either a `DiscoverInstances` request or using DNS. For the current quota on the number of namespaces that you can create using the same AWS account , see [AWS Cloud Map quotas](https://docs.aws.amazon.com/cloud-map/latest/dg/cloud-map-limits.html) in the *AWS Cloud Map 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" cfnPrivateDnsNamespace := awscdk.Aws_servicediscovery.NewCfnPrivateDnsNamespace(this, jsii.String("MyCfnPrivateDnsNamespace"), &cfnPrivateDnsNamespaceProps{ name: jsii.String("name"), vpc: jsii.String("vpc"), // the properties below are optional description: jsii.String("description"), properties: &propertiesProperty{ dnsProperties: &privateDnsPropertiesMutableProperty{ soa: &sOAProperty{ ttl: jsii.Number(123), }, }, }, tags: []cfnTag{ &cfnTag{ key: jsii.String("key"), value: jsii.String("value"), }, }, })
func NewCfnPrivateDnsNamespace ¶
func NewCfnPrivateDnsNamespace(scope constructs.Construct, id *string, props *CfnPrivateDnsNamespaceProps) CfnPrivateDnsNamespace
Create a new `AWS::ServiceDiscovery::PrivateDnsNamespace`.
type CfnPrivateDnsNamespaceProps ¶
type CfnPrivateDnsNamespaceProps struct { // The name that you want to assign to this namespace. // // When you create a private DNS namespace, AWS Cloud Map automatically creates an Amazon Route 53 private hosted zone that has the same name as the namespace. Name *string `field:"required" json:"name" yaml:"name"` // The ID of the Amazon VPC that you want to associate the namespace with. Vpc *string `field:"required" json:"vpc" yaml:"vpc"` // A description for the namespace. Description *string `field:"optional" json:"description" yaml:"description"` // Properties for the private DNS namespace. Properties interface{} `field:"optional" json:"properties" yaml:"properties"` // The tags for the namespace. // // Each tag consists of a key and an optional value, both of which you define. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters. Tags *[]*awscdk.CfnTag `field:"optional" json:"tags" yaml:"tags"` }
Properties for defining a `CfnPrivateDnsNamespace`.
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" cfnPrivateDnsNamespaceProps := &cfnPrivateDnsNamespaceProps{ name: jsii.String("name"), vpc: jsii.String("vpc"), // the properties below are optional description: jsii.String("description"), properties: &propertiesProperty{ dnsProperties: &privateDnsPropertiesMutableProperty{ soa: &sOAProperty{ ttl: jsii.Number(123), }, }, }, tags: []cfnTag{ &cfnTag{ key: jsii.String("key"), value: jsii.String("value"), }, }, }
type CfnPrivateDnsNamespace_PrivateDnsPropertiesMutableProperty ¶
type CfnPrivateDnsNamespace_PrivateDnsPropertiesMutableProperty struct {
// Fields for the Start of Authority (SOA) record for the hosted zone for the private DNS namespace.
Soa interface{} `field:"optional" json:"soa" yaml:"soa"`
}
DNS properties for the private DNS namespace.
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" privateDnsPropertiesMutableProperty := &privateDnsPropertiesMutableProperty{ soa: &sOAProperty{ ttl: jsii.Number(123), }, }
type CfnPrivateDnsNamespace_PropertiesProperty ¶
type CfnPrivateDnsNamespace_PropertiesProperty struct {
// DNS properties for the private DNS namespace.
DnsProperties interface{} `field:"optional" json:"dnsProperties" yaml:"dnsProperties"`
}
Properties for the private DNS namespace.
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" propertiesProperty := &propertiesProperty{ dnsProperties: &privateDnsPropertiesMutableProperty{ soa: &sOAProperty{ ttl: jsii.Number(123), }, }, }
type CfnPrivateDnsNamespace_SOAProperty ¶
type CfnPrivateDnsNamespace_SOAProperty struct { // The time to live (TTL) for purposes of negative caching. Ttl *float64 `field:"optional" json:"ttl" yaml:"ttl"` }
Start of Authority (SOA) properties for a public or private DNS namespace.
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" sOAProperty := &sOAProperty{ ttl: jsii.Number(123), }
type CfnPublicDnsNamespace ¶
type CfnPublicDnsNamespace interface { awscdk.CfnResource awscdk.IInspectable // The Amazon Resource Name (ARN) of the public namespace. AttrArn() *string // The ID for the Route 53 hosted zone that AWS Cloud Map creates when you create a namespace. AttrHostedZoneId() *string // The ID of the public namespace. AttrId() *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 // A description for the namespace. Description() *string SetDescription(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 that you want to assign to this namespace. Name() *string SetName(val *string) // The tree node. Node() constructs.Node // Properties for the public DNS namespace. Properties() interface{} SetProperties(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 tags for the namespace. // // Each tag consists of a key and an optional value, both of which you define. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters. Tags() awscdk.TagManager // Deprecated. // Deprecated: use `updatedProperties` // // Return properties modified after initiation // // Resources that expose mutable properties should override this function to // collect and return the properties object for this resource. UpdatedProperites() *map[string]interface{} // Return properties modified after initiation. // // Resources that expose mutable properties should override this function to // collect and return the properties object for this resource. UpdatedProperties() *map[string]interface{} // Syntactic sugar for `addOverride(path, undefined)`. AddDeletionOverride(path *string) // Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. // // This can be used for resources across stacks (or nested stack) boundaries // and the dependency will automatically be transferred to the relevant scope. AddDependsOn(target awscdk.CfnResource) // Add a value to the CloudFormation Resource Metadata. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html // // Note that this is a different set of metadata from CDK node metadata; this // metadata ends up in the stack template under the resource, whereas CDK // node metadata ends up in the Cloud Assembly. // AddMetadata(key *string, value interface{}) // Adds an override to the synthesized CloudFormation resource. // // To add a // property override, either use `addPropertyOverride` or prefix `path` with // "Properties." (i.e. `Properties.TopicName`). // // If the override is nested, separate each nested level using a dot (.) in the path parameter. // If there is an array as part of the nesting, specify the index in the path. // // To include a literal `.` in the property name, prefix with a `\`. In most // programming languages you will need to write this as `"\\."` because the // `\` itself will need to be escaped. // // For example, // “`typescript // cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']); // cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE'); // “` // would add the overrides // “`json // "Properties": { // "GlobalSecondaryIndexes": [ // { // "Projection": { // "NonKeyAttributes": [ "myattribute" ] // ... // } // ... // }, // { // "ProjectionType": "INCLUDE" // ... // }, // ] // ... // } // “` // // The `value` argument to `addOverride` will not be processed or translated // in any way. Pass raw JSON values in here with the correct capitalization // for CloudFormation. If you pass CDK classes or structs, they will be // rendered with lowercased key names, and CloudFormation will reject the // template. AddOverride(path *string, value interface{}) // Adds an override that deletes the value of a property from the resource definition. AddPropertyDeletionOverride(propertyPath *string) // Adds an override to a resource property. // // Syntactic sugar for `addOverride("Properties.<...>", value)`. AddPropertyOverride(propertyPath *string, value interface{}) // Sets the deletion policy of the resource based on the removal policy specified. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). In some // cases, a snapshot can be taken of the resource prior to deletion // (`RemovalPolicy.SNAPSHOT`). A list of resources that support this policy // can be found in the following link:. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html#aws-attribute-deletionpolicy-options // ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions) // Returns a token for an runtime attribute of this resource. // // Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility // in case there is no generated attribute. GetAtt(attributeName *string) awscdk.Reference // Retrieve a value value from the CloudFormation Resource Metadata. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html // // Note that this is a different set of metadata from CDK node metadata; this // metadata ends up in the stack template under the resource, whereas CDK // node metadata ends up in the Cloud Assembly. // GetMetadata(key *string) interface{} // Examines the CloudFormation resource and discloses attributes. Inspect(inspector awscdk.TreeInspector) // Overrides the auto-generated logical ID with a specific ID. OverrideLogicalId(newLogicalId *string) RenderProperties(props *map[string]interface{}) *map[string]interface{} // Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template. // // Returns: `true` if the resource should be included or `false` is the resource // should be omitted. ShouldSynthesize() *bool // Returns a string representation of this construct. // // Returns: a string representation of this resource. ToString() *string ValidateProperties(_properties interface{}) }
A CloudFormation `AWS::ServiceDiscovery::PublicDnsNamespace`.
Creates a public namespace based on DNS, which is visible on the internet. The namespace defines your service naming scheme. For example, if you name your namespace `example.com` and name your service `backend` , the resulting DNS name for the service is `backend.example.com` . You can discover instances that were registered with a public DNS namespace by using either a `DiscoverInstances` request or using DNS. For the current quota on the number of namespaces that you can create using the same AWS account , see [AWS Cloud Map quotas](https://docs.aws.amazon.com/cloud-map/latest/dg/cloud-map-limits.html) in the *AWS Cloud Map Developer Guide* .
> The `CreatePublicDnsNamespace` API operation is not supported in the AWS GovCloud (US) Regions.
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" cfnPublicDnsNamespace := awscdk.Aws_servicediscovery.NewCfnPublicDnsNamespace(this, jsii.String("MyCfnPublicDnsNamespace"), &cfnPublicDnsNamespaceProps{ name: jsii.String("name"), // the properties below are optional description: jsii.String("description"), properties: &propertiesProperty{ dnsProperties: &publicDnsPropertiesMutableProperty{ soa: &sOAProperty{ ttl: jsii.Number(123), }, }, }, tags: []cfnTag{ &cfnTag{ key: jsii.String("key"), value: jsii.String("value"), }, }, })
func NewCfnPublicDnsNamespace ¶
func NewCfnPublicDnsNamespace(scope constructs.Construct, id *string, props *CfnPublicDnsNamespaceProps) CfnPublicDnsNamespace
Create a new `AWS::ServiceDiscovery::PublicDnsNamespace`.
type CfnPublicDnsNamespaceProps ¶
type CfnPublicDnsNamespaceProps struct { // The name that you want to assign to this namespace. Name *string `field:"required" json:"name" yaml:"name"` // A description for the namespace. Description *string `field:"optional" json:"description" yaml:"description"` // Properties for the public DNS namespace. Properties interface{} `field:"optional" json:"properties" yaml:"properties"` // The tags for the namespace. // // Each tag consists of a key and an optional value, both of which you define. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters. Tags *[]*awscdk.CfnTag `field:"optional" json:"tags" yaml:"tags"` }
Properties for defining a `CfnPublicDnsNamespace`.
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" cfnPublicDnsNamespaceProps := &cfnPublicDnsNamespaceProps{ name: jsii.String("name"), // the properties below are optional description: jsii.String("description"), properties: &propertiesProperty{ dnsProperties: &publicDnsPropertiesMutableProperty{ soa: &sOAProperty{ ttl: jsii.Number(123), }, }, }, tags: []cfnTag{ &cfnTag{ key: jsii.String("key"), value: jsii.String("value"), }, }, }
type CfnPublicDnsNamespace_PropertiesProperty ¶
type CfnPublicDnsNamespace_PropertiesProperty struct {
// DNS properties for the public DNS namespace.
DnsProperties interface{} `field:"optional" json:"dnsProperties" yaml:"dnsProperties"`
}
Properties for the public DNS namespace.
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" propertiesProperty := &propertiesProperty{ dnsProperties: &publicDnsPropertiesMutableProperty{ soa: &sOAProperty{ ttl: jsii.Number(123), }, }, }
type CfnPublicDnsNamespace_PublicDnsPropertiesMutableProperty ¶
type CfnPublicDnsNamespace_PublicDnsPropertiesMutableProperty struct {
// Start of Authority (SOA) record for the hosted zone for the public DNS namespace.
Soa interface{} `field:"optional" json:"soa" yaml:"soa"`
}
DNS properties for the public DNS namespace.
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" publicDnsPropertiesMutableProperty := &publicDnsPropertiesMutableProperty{ soa: &sOAProperty{ ttl: jsii.Number(123), }, }
type CfnPublicDnsNamespace_SOAProperty ¶
type CfnPublicDnsNamespace_SOAProperty struct { // The time to live (TTL) for purposes of negative caching. Ttl *float64 `field:"optional" json:"ttl" yaml:"ttl"` }
Start of Authority (SOA) properties for a public or private DNS namespace.
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" sOAProperty := &sOAProperty{ ttl: jsii.Number(123), }
type CfnService ¶
type CfnService interface { awscdk.CfnResource awscdk.IInspectable // The Amazon Resource Name (ARN) of the service. AttrArn() *string // The ID of the service. AttrId() *string // The name that you assigned to the service. AttrName() *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 description of the service. Description() *string SetDescription(val *string) // A complex type that contains information about the Route 53 DNS records that you want AWS Cloud Map to create when you register an instance. DnsConfig() interface{} SetDnsConfig(val interface{}) // *Public DNS and HTTP namespaces only.* A complex type that contains settings for an optional health check. If you specify settings for a health check, AWS Cloud Map associates the health check with the records that you specify in `DnsConfig` . // // For information about the charges for health checks, see [Amazon Route 53 Pricing](https://docs.aws.amazon.com/route53/pricing/) . HealthCheckConfig() interface{} SetHealthCheckConfig(val interface{}) // A complex type that contains information about an optional custom health check. // // > If you specify a health check configuration, you can specify either `HealthCheckCustomConfig` or `HealthCheckConfig` but not both. HealthCheckCustomConfig() interface{} SetHealthCheckCustomConfig(val interface{}) // 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 service. Name() *string SetName(val *string) // The ID of the namespace that was used to create the service. // // > You must specify a value for `NamespaceId` either for the service properties or for [DnsConfig](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-servicediscovery-service-dnsconfig.html) . Don't specify a value in both places. NamespaceId() *string SetNamespaceId(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 // The tags for the service. // // Each tag consists of a key and an optional value, both of which you define. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters. Tags() awscdk.TagManager // If present, specifies that the service instances are only discoverable using the `DiscoverInstances` API operation. // // No DNS records is registered for the service instances. The only valid value is `HTTP` . Type() *string SetType(val *string) // Deprecated. // Deprecated: use `updatedProperties` // // Return properties modified after initiation // // Resources that expose mutable properties should override this function to // collect and return the properties object for this resource. UpdatedProperites() *map[string]interface{} // Return properties modified after initiation. // // Resources that expose mutable properties should override this function to // collect and return the properties object for this resource. UpdatedProperties() *map[string]interface{} // Syntactic sugar for `addOverride(path, undefined)`. AddDeletionOverride(path *string) // Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. // // This can be used for resources across stacks (or nested stack) boundaries // and the dependency will automatically be transferred to the relevant scope. AddDependsOn(target awscdk.CfnResource) // Add a value to the CloudFormation Resource Metadata. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html // // Note that this is a different set of metadata from CDK node metadata; this // metadata ends up in the stack template under the resource, whereas CDK // node metadata ends up in the Cloud Assembly. // AddMetadata(key *string, value interface{}) // Adds an override to the synthesized CloudFormation resource. // // To add a // property override, either use `addPropertyOverride` or prefix `path` with // "Properties." (i.e. `Properties.TopicName`). // // If the override is nested, separate each nested level using a dot (.) in the path parameter. // If there is an array as part of the nesting, specify the index in the path. // // To include a literal `.` in the property name, prefix with a `\`. In most // programming languages you will need to write this as `"\\."` because the // `\` itself will need to be escaped. // // For example, // “`typescript // cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']); // cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE'); // “` // would add the overrides // “`json // "Properties": { // "GlobalSecondaryIndexes": [ // { // "Projection": { // "NonKeyAttributes": [ "myattribute" ] // ... // } // ... // }, // { // "ProjectionType": "INCLUDE" // ... // }, // ] // ... // } // “` // // The `value` argument to `addOverride` will not be processed or translated // in any way. Pass raw JSON values in here with the correct capitalization // for CloudFormation. If you pass CDK classes or structs, they will be // rendered with lowercased key names, and CloudFormation will reject the // template. AddOverride(path *string, value interface{}) // Adds an override that deletes the value of a property from the resource definition. AddPropertyDeletionOverride(propertyPath *string) // Adds an override to a resource property. // // Syntactic sugar for `addOverride("Properties.<...>", value)`. AddPropertyOverride(propertyPath *string, value interface{}) // Sets the deletion policy of the resource based on the removal policy specified. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). In some // cases, a snapshot can be taken of the resource prior to deletion // (`RemovalPolicy.SNAPSHOT`). A list of resources that support this policy // can be found in the following link:. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html#aws-attribute-deletionpolicy-options // ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions) // Returns a token for an runtime attribute of this resource. // // Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility // in case there is no generated attribute. GetAtt(attributeName *string) awscdk.Reference // Retrieve a value value from the CloudFormation Resource Metadata. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html // // Note that this is a different set of metadata from CDK node metadata; this // metadata ends up in the stack template under the resource, whereas CDK // node metadata ends up in the Cloud Assembly. // GetMetadata(key *string) interface{} // Examines the CloudFormation resource and discloses attributes. Inspect(inspector awscdk.TreeInspector) // Overrides the auto-generated logical ID with a specific ID. OverrideLogicalId(newLogicalId *string) RenderProperties(props *map[string]interface{}) *map[string]interface{} // Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template. // // Returns: `true` if the resource should be included or `false` is the resource // should be omitted. ShouldSynthesize() *bool // Returns a string representation of this construct. // // Returns: a string representation of this resource. ToString() *string ValidateProperties(_properties interface{}) }
A CloudFormation `AWS::ServiceDiscovery::Service`.
A complex type that contains information about a service, which defines the configuration of the following entities:
- For public and private DNS namespaces, one of the following combinations of DNS records in Amazon Route 53:
- A - AAAA - A and AAAA - SRV - CNAME - Optionally, a health check.
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" cfnService := awscdk.Aws_servicediscovery.NewCfnService(this, jsii.String("MyCfnService"), &cfnServiceProps{ description: jsii.String("description"), dnsConfig: &dnsConfigProperty{ dnsRecords: []interface{}{ &dnsRecordProperty{ ttl: jsii.Number(123), type: jsii.String("type"), }, }, // the properties below are optional namespaceId: jsii.String("namespaceId"), routingPolicy: jsii.String("routingPolicy"), }, healthCheckConfig: &healthCheckConfigProperty{ type: jsii.String("type"), // the properties below are optional failureThreshold: jsii.Number(123), resourcePath: jsii.String("resourcePath"), }, healthCheckCustomConfig: &healthCheckCustomConfigProperty{ failureThreshold: jsii.Number(123), }, name: jsii.String("name"), namespaceId: jsii.String("namespaceId"), tags: []cfnTag{ &cfnTag{ key: jsii.String("key"), value: jsii.String("value"), }, }, type: jsii.String("type"), })
func NewCfnService ¶
func NewCfnService(scope constructs.Construct, id *string, props *CfnServiceProps) CfnService
Create a new `AWS::ServiceDiscovery::Service`.
type CfnServiceProps ¶
type CfnServiceProps struct { // The description of the service. Description *string `field:"optional" json:"description" yaml:"description"` // A complex type that contains information about the Route 53 DNS records that you want AWS Cloud Map to create when you register an instance. DnsConfig interface{} `field:"optional" json:"dnsConfig" yaml:"dnsConfig"` // *Public DNS and HTTP namespaces only.* A complex type that contains settings for an optional health check. If you specify settings for a health check, AWS Cloud Map associates the health check with the records that you specify in `DnsConfig` . // // For information about the charges for health checks, see [Amazon Route 53 Pricing](https://docs.aws.amazon.com/route53/pricing/) . HealthCheckConfig interface{} `field:"optional" json:"healthCheckConfig" yaml:"healthCheckConfig"` // A complex type that contains information about an optional custom health check. // // > If you specify a health check configuration, you can specify either `HealthCheckCustomConfig` or `HealthCheckConfig` but not both. HealthCheckCustomConfig interface{} `field:"optional" json:"healthCheckCustomConfig" yaml:"healthCheckCustomConfig"` // The name of the service. Name *string `field:"optional" json:"name" yaml:"name"` // The ID of the namespace that was used to create the service. // // > You must specify a value for `NamespaceId` either for the service properties or for [DnsConfig](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-servicediscovery-service-dnsconfig.html) . Don't specify a value in both places. NamespaceId *string `field:"optional" json:"namespaceId" yaml:"namespaceId"` // The tags for the service. // // Each tag consists of a key and an optional value, both of which you define. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters. Tags *[]*awscdk.CfnTag `field:"optional" json:"tags" yaml:"tags"` // If present, specifies that the service instances are only discoverable using the `DiscoverInstances` API operation. // // No DNS records is registered for the service instances. The only valid value is `HTTP` . Type *string `field:"optional" json:"type" yaml:"type"` }
Properties for defining a `CfnService`.
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" cfnServiceProps := &cfnServiceProps{ description: jsii.String("description"), dnsConfig: &dnsConfigProperty{ dnsRecords: []interface{}{ &dnsRecordProperty{ ttl: jsii.Number(123), type: jsii.String("type"), }, }, // the properties below are optional namespaceId: jsii.String("namespaceId"), routingPolicy: jsii.String("routingPolicy"), }, healthCheckConfig: &healthCheckConfigProperty{ type: jsii.String("type"), // the properties below are optional failureThreshold: jsii.Number(123), resourcePath: jsii.String("resourcePath"), }, healthCheckCustomConfig: &healthCheckCustomConfigProperty{ failureThreshold: jsii.Number(123), }, name: jsii.String("name"), namespaceId: jsii.String("namespaceId"), tags: []cfnTag{ &cfnTag{ key: jsii.String("key"), value: jsii.String("value"), }, }, type: jsii.String("type"), }
type CfnService_DnsConfigProperty ¶
type CfnService_DnsConfigProperty struct { // An array that contains one `DnsRecord` object for each Route 53 DNS record that you want AWS Cloud Map to create when you register an instance. DnsRecords interface{} `field:"required" json:"dnsRecords" yaml:"dnsRecords"` // The ID of the namespace to use for DNS configuration. // // > You must specify a value for `NamespaceId` either for `DnsConfig` or for the [service properties](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-servicediscovery-service.html) . Don't specify a value in both places. NamespaceId *string `field:"optional" json:"namespaceId" yaml:"namespaceId"` // The routing policy that you want to apply to all Route 53 DNS records that AWS Cloud Map creates when you register an instance and specify this service. // // > If you want to use this service to register instances that create alias records, specify `WEIGHTED` for the routing policy. // // You can specify the following values: // // - **MULTIVALUE** - If you define a health check for the service and the health check is healthy, Route 53 returns the applicable value for up to eight instances. // // For example, suppose that the service includes configurations for one `A` record and a health check. You use the service to register 10 instances. Route 53 responds to DNS queries with IP addresses for up to eight healthy instances. If fewer than eight instances are healthy, Route 53 responds to every DNS query with the IP addresses for all of the healthy instances. // // If you don't define a health check for the service, Route 53 assumes that all instances are healthy and returns the values for up to eight instances. // // For more information about the multivalue routing policy, see [Multivalue Answer Routing](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-policy.html#routing-policy-multivalue) in the *Route 53 Developer Guide* . // - **WEIGHTED** - Route 53 returns the applicable value from one randomly selected instance from among the instances that you registered using the same service. Currently, all records have the same weight, so you can't route more or less traffic to any instances. // // For example, suppose that the service includes configurations for one `A` record and a health check. You use the service to register 10 instances. Route 53 responds to DNS queries with the IP address for one randomly selected instance from among the healthy instances. If no instances are healthy, Route 53 responds to DNS queries as if all of the instances were healthy. // // If you don't define a health check for the service, Route 53 assumes that all instances are healthy and returns the applicable value for one randomly selected instance. // // For more information about the weighted routing policy, see [Weighted Routing](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-policy.html#routing-policy-weighted) in the *Route 53 Developer Guide* . RoutingPolicy *string `field:"optional" json:"routingPolicy" yaml:"routingPolicy"` }
A complex type that contains information about the Amazon Route 53 DNS records that you want AWS Cloud Map to create when you register an instance.
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" dnsConfigProperty := &dnsConfigProperty{ dnsRecords: []interface{}{ &dnsRecordProperty{ ttl: jsii.Number(123), type: jsii.String("type"), }, }, // the properties below are optional namespaceId: jsii.String("namespaceId"), routingPolicy: jsii.String("routingPolicy"), }
type CfnService_DnsRecordProperty ¶
type CfnService_DnsRecordProperty struct { // The amount of time, in seconds, that you want DNS resolvers to cache the settings for this record. // // > Alias records don't include a TTL because Route 53 uses the TTL for the AWS resource that an alias record routes traffic to. If you include the `AWS_ALIAS_DNS_NAME` attribute when you submit a [RegisterInstance](https://docs.aws.amazon.com/cloud-map/latest/api/API_RegisterInstance.html) request, the `TTL` value is ignored. Always specify a TTL for the service; you can use a service to register instances that create either alias or non-alias records. Ttl *float64 `field:"required" json:"ttl" yaml:"ttl"` // The type of the resource, which indicates the type of value that Route 53 returns in response to DNS queries. // // You can specify values for `Type` in the following combinations: // // - `A` // - `AAAA` // - `A` and `AAAA` // - `SRV` // - `CNAME` // // If you want AWS Cloud Map to create a Route 53 alias record when you register an instance, specify `A` or `AAAA` for `Type` . // // You specify other settings, such as the IP address for `A` and `AAAA` records, when you register an instance. For more information, see [RegisterInstance](https://docs.aws.amazon.com/cloud-map/latest/api/API_RegisterInstance.html) . // // The following values are supported: // // - **A** - Route 53 returns the IP address of the resource in IPv4 format, such as 192.0.2.44. // - **AAAA** - Route 53 returns the IP address of the resource in IPv6 format, such as 2001:0db8:85a3:0000:0000:abcd:0001:2345. // - **CNAME** - Route 53 returns the domain name of the resource, such as www.example.com. Note the following: // // - You specify the domain name that you want to route traffic to when you register an instance. For more information, see [Attributes](https://docs.aws.amazon.com/cloud-map/latest/api/API_RegisterInstance.html#cloudmap-RegisterInstance-request-Attributes) in the topic [RegisterInstance](https://docs.aws.amazon.com/cloud-map/latest/api/API_RegisterInstance.html) . // - You must specify `WEIGHTED` for the value of `RoutingPolicy` . // - You can't specify both `CNAME` for `Type` and settings for `HealthCheckConfig` . If you do, the request will fail with an `InvalidInput` error. // - **SRV** - Route 53 returns the value for an `SRV` record. The value for an `SRV` record uses the following values: // // `priority weight port service-hostname` // // Note the following about the values: // // - The values of `priority` and `weight` are both set to `1` and can't be changed. // - The value of `port` comes from the value that you specify for the `AWS_INSTANCE_PORT` attribute when you submit a [RegisterInstance](https://docs.aws.amazon.com/cloud-map/latest/api/API_RegisterInstance.html) request. // - The value of `service-hostname` is a concatenation of the following values: // // - The value that you specify for `InstanceId` when you register an instance. // - The name of the service. // - The name of the namespace. // // For example, if the value of `InstanceId` is `test` , the name of the service is `backend` , and the name of the namespace is `example.com` , the value of `service-hostname` is: // // `test.backend.example.com` // // If you specify settings for an `SRV` record and if you specify values for `AWS_INSTANCE_IPV4` , `AWS_INSTANCE_IPV6` , or both in the `RegisterInstance` request, AWS Cloud Map automatically creates `A` and/or `AAAA` records that have the same name as the value of `service-hostname` in the `SRV` record. You can ignore these records. Type *string `field:"required" json:"type" yaml:"type"` }
A complex type that contains information about the Route 53 DNS records that you want AWS Cloud Map to create when you register an instance.
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" dnsRecordProperty := &dnsRecordProperty{ ttl: jsii.Number(123), type: jsii.String("type"), }
type CfnService_HealthCheckConfigProperty ¶
type CfnService_HealthCheckConfigProperty struct { // The type of health check that you want to create, which indicates how Route 53 determines whether an endpoint is healthy. // // > You can't change the value of `Type` after you create a health check. // // You can create the following types of health checks: // // - *HTTP* : Route 53 tries to establish a TCP connection. If successful, Route 53 submits an HTTP request and waits for an HTTP status code of 200 or greater and less than 400. // - *HTTPS* : Route 53 tries to establish a TCP connection. If successful, Route 53 submits an HTTPS request and waits for an HTTP status code of 200 or greater and less than 400. // // > If you specify HTTPS for the value of `Type` , the endpoint must support TLS v1.0 or later. // - *TCP* : Route 53 tries to establish a TCP connection. // // If you specify `TCP` for `Type` , don't specify a value for `ResourcePath` . // // For more information, see [How Route 53 Determines Whether an Endpoint Is Healthy](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-determining-health-of-endpoints.html) in the *Route 53 Developer Guide* . Type *string `field:"required" json:"type" yaml:"type"` // The number of consecutive health checks that an endpoint must pass or fail for Route 53 to change the current status of the endpoint from unhealthy to healthy or the other way around. // // For more information, see [How Route 53 Determines Whether an Endpoint Is Healthy](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-determining-health-of-endpoints.html) in the *Route 53 Developer Guide* . FailureThreshold *float64 `field:"optional" json:"failureThreshold" yaml:"failureThreshold"` // The path that you want Route 53 to request when performing health checks. // // The path can be any value that your endpoint returns an HTTP status code of a 2xx or 3xx format for when the endpoint is healthy. An example file is `/docs/route53-health-check.html` . Route 53 automatically adds the DNS name for the service. If you don't specify a value for `ResourcePath` , the default value is `/` . // // If you specify `TCP` for `Type` , you must *not* specify a value for `ResourcePath` . ResourcePath *string `field:"optional" json:"resourcePath" yaml:"resourcePath"` }
*Public DNS and HTTP namespaces only.* A complex type that contains settings for an optional health check. If you specify settings for a health check, AWS Cloud Map associates the health check with the records that you specify in `DnsConfig` .
> If you specify a health check configuration, you can specify either `HealthCheckCustomConfig` or `HealthCheckConfig` but not both.
Health checks are basic Route 53 health checks that monitor an AWS endpoint. For information about pricing for health checks, see [Amazon Route 53 Pricing](https://docs.aws.amazon.com/route53/pricing/) .
Note the following about configuring health checks.
- **A and AAAA records** - If `DnsConfig` includes configurations for both `A` and `AAAA` records, AWS Cloud Map creates a health check that uses the IPv4 address to check the health of the resource. If the endpoint tthat's specified by the IPv4 address is unhealthy, Route 53 considers both the `A` and `AAAA` records to be unhealthy. - **CNAME records** - You can't specify settings for `HealthCheckConfig` when the `DNSConfig` includes `CNAME` for the value of `Type` . If you do, the `CreateService` request will fail with an `InvalidInput` error. - **Request interval** - A Route 53 health checker in each health-checking AWS Region sends a health check request to an endpoint every 30 seconds. On average, your endpoint receives a health check request about every two seconds. However, health checkers don't coordinate with one another. Therefore, you might sometimes see several requests in one second that's followed by a few seconds with no health checks at all. - **Health checking regions** - Health checkers perform checks from all Route 53 health-checking Regions. For a list of the current Regions, see [Regions](https://docs.aws.amazon.com/Route53/latest/APIReference/API_HealthCheckConfig.html#Route53-Type-HealthCheckConfig-Regions) . - **Alias records** - When you register an instance, if you include the `AWS_ALIAS_DNS_NAME` attribute, AWS Cloud Map creates a Route 53 alias record. Note the following:
- Route 53 automatically sets `EvaluateTargetHealth` to true for alias records. When `EvaluateTargetHealth` is true, the alias record inherits the health of the referenced AWS resource. such as an ELB load balancer. For more information, see [EvaluateTargetHealth](https://docs.aws.amazon.com/Route53/latest/APIReference/API_AliasTarget.html#Route53-Type-AliasTarget-EvaluateTargetHealth) . - If you include `HealthCheckConfig` and then use the service to register an instance that creates an alias record, Route 53 doesn't create the health check. - **Charges for health checks** - Health checks are basic Route 53 health checks that monitor an AWS endpoint. For information about pricing for health checks, see [Amazon Route 53 Pricing](https://docs.aws.amazon.com/route53/pricing/) .
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" healthCheckConfigProperty := &healthCheckConfigProperty{ type: jsii.String("type"), // the properties below are optional failureThreshold: jsii.Number(123), resourcePath: jsii.String("resourcePath"), }
type CfnService_HealthCheckCustomConfigProperty ¶
type CfnService_HealthCheckCustomConfigProperty struct { // > This parameter is no longer supported and is always set to 1. // // AWS Cloud Map waits for approximately 30 seconds after receiving an `UpdateInstanceCustomHealthStatus` request before changing the status of the service instance. // // The number of 30-second intervals that you want AWS Cloud Map to wait after receiving an `UpdateInstanceCustomHealthStatus` request before it changes the health status of a service instance. // // Sending a second or subsequent `UpdateInstanceCustomHealthStatus` request with the same value before 30 seconds has passed doesn't accelerate the change. AWS Cloud Map still waits `30` seconds after the first request to make the change. FailureThreshold *float64 `field:"optional" json:"failureThreshold" yaml:"failureThreshold"` }
A complex type that contains information about an optional custom health check.
A custom health check, which requires that you use a third-party health checker to evaluate the health of your resources, is useful in the following circumstances:
- You can't use a health check that's defined by `HealthCheckConfig` because the resource isn't available over the internet. For example, you can use a custom health check when the instance is in an Amazon VPC. (To check the health of resources in a VPC, the health checker must also be in the VPC.) - You want to use a third-party health checker regardless of where your resources are located.
> If you specify a health check configuration, you can specify either `HealthCheckCustomConfig` or `HealthCheckConfig` but not both.
To change the status of a custom health check, submit an `UpdateInstanceCustomHealthStatus` request. AWS Cloud Map doesn't monitor the status of the resource, it just keeps a record of the status specified in the most recent `UpdateInstanceCustomHealthStatus` request.
Here's how custom health checks work:
- You create a service. - You register an instance. - You configure a third-party health checker to monitor the resource that's associated with the new instance.
> AWS Cloud Map doesn't check the health of the resource directly. - The third-party health-checker determines that the resource is unhealthy and notifies your application. - Your application submits an `UpdateInstanceCustomHealthStatus` request. - AWS Cloud Map waits for 30 seconds. - If another `UpdateInstanceCustomHealthStatus` request doesn't arrive during that time to change the status back to healthy, AWS Cloud Map stops routing traffic to the resource.
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" healthCheckCustomConfigProperty := &healthCheckCustomConfigProperty{ failureThreshold: jsii.Number(123), }
type CnameInstance ¶
type CnameInstance interface { InstanceBase // The domain name returned by DNS queries for the instance. Cname() *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 Id of the instance. InstanceId() *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 Cloudmap service to which the instance is registered. Service() IService // The stack in which this resource is defined. Stack() awscdk.Stack // 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 // Generate a unique instance Id that is safe to pass to CloudMap. UniqueInstanceId() *string }
Instance that is accessible using a domain name (CNAME).
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 service service cnameInstance := awscdk.Aws_servicediscovery.NewCnameInstance(this, jsii.String("MyCnameInstance"), &cnameInstanceProps{ instanceCname: jsii.String("instanceCname"), service: service, // the properties below are optional customAttributes: map[string]*string{ "customAttributesKey": jsii.String("customAttributes"), }, instanceId: jsii.String("instanceId"), })
func NewCnameInstance ¶
func NewCnameInstance(scope constructs.Construct, id *string, props *CnameInstanceProps) CnameInstance
type CnameInstanceBaseProps ¶
type CnameInstanceBaseProps struct { // Custom attributes of the instance. CustomAttributes *map[string]*string `field:"optional" json:"customAttributes" yaml:"customAttributes"` // The id of the instance resource. InstanceId *string `field:"optional" json:"instanceId" yaml:"instanceId"` // If the service configuration includes a CNAME record, the domain name that you want Route 53 to return in response to DNS queries, for example, example.com. This value is required if the service specified by ServiceId includes settings for an CNAME record. InstanceCname *string `field:"required" json:"instanceCname" yaml:"instanceCname"` }
Example:
import cdk "github.com/aws/aws-cdk-go/awscdk" import servicediscovery "github.com/aws/aws-cdk-go/awscdk" app := cdk.NewApp() stack := cdk.NewStack(app, jsii.String("aws-servicediscovery-integ")) namespace := servicediscovery.NewPublicDnsNamespace(stack, jsii.String("Namespace"), &publicDnsNamespaceProps{ name: jsii.String("foobar.com"), }) service := namespace.createService(jsii.String("Service"), &dnsServiceProps{ name: jsii.String("foo"), dnsRecordType: servicediscovery.dnsRecordType_CNAME, dnsTtl: cdk.duration.seconds(jsii.Number(30)), }) service.registerCnameInstance(jsii.String("CnameInstance"), &cnameInstanceBaseProps{ instanceCname: jsii.String("service.pizza"), }) app.synth()
type CnameInstanceProps ¶
type CnameInstanceProps struct { // Custom attributes of the instance. CustomAttributes *map[string]*string `field:"optional" json:"customAttributes" yaml:"customAttributes"` // The id of the instance resource. InstanceId *string `field:"optional" json:"instanceId" yaml:"instanceId"` // If the service configuration includes a CNAME record, the domain name that you want Route 53 to return in response to DNS queries, for example, example.com. This value is required if the service specified by ServiceId includes settings for an CNAME record. InstanceCname *string `field:"required" json:"instanceCname" yaml:"instanceCname"` // The Cloudmap service this resource is registered to. Service IService `field:"required" json:"service" yaml:"service"` }
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 service service cnameInstanceProps := &cnameInstanceProps{ instanceCname: jsii.String("instanceCname"), service: service, // the properties below are optional customAttributes: map[string]*string{ "customAttributesKey": jsii.String("customAttributes"), }, instanceId: jsii.String("instanceId"), }
type DnsRecordType ¶
type DnsRecordType string
Example:
import cdk "github.com/aws/aws-cdk-go/awscdk" import servicediscovery "github.com/aws/aws-cdk-go/awscdk" app := cdk.NewApp() stack := cdk.NewStack(app, jsii.String("aws-servicediscovery-integ")) namespace := servicediscovery.NewPublicDnsNamespace(stack, jsii.String("Namespace"), &publicDnsNamespaceProps{ name: jsii.String("foobar.com"), }) service := namespace.createService(jsii.String("Service"), &dnsServiceProps{ name: jsii.String("foo"), dnsRecordType: servicediscovery.dnsRecordType_CNAME, dnsTtl: cdk.duration.seconds(jsii.Number(30)), }) service.registerCnameInstance(jsii.String("CnameInstance"), &cnameInstanceBaseProps{ instanceCname: jsii.String("service.pizza"), }) app.synth()
const ( // An A record. DnsRecordType_A DnsRecordType = "A" // An AAAA record. DnsRecordType_AAAA DnsRecordType = "AAAA" // Both an A and AAAA record. DnsRecordType_A_AAAA DnsRecordType = "A_AAAA" // A Srv record. DnsRecordType_SRV DnsRecordType = "SRV" // A CNAME record. DnsRecordType_CNAME DnsRecordType = "CNAME" )
type DnsServiceProps ¶
type DnsServiceProps struct { // Structure containing failure threshold for a custom health checker. // // Only one of healthCheckConfig or healthCheckCustomConfig can be specified. // See: https://docs.aws.amazon.com/cloud-map/latest/api/API_HealthCheckCustomConfig.html CustomHealthCheck *HealthCheckCustomConfig `field:"optional" json:"customHealthCheck" yaml:"customHealthCheck"` // A description of the service. Description *string `field:"optional" json:"description" yaml:"description"` // Settings for an optional health check. // // If you specify health check settings, AWS Cloud Map associates the health // check with the records that you specify in DnsConfig. Only one of healthCheckConfig or healthCheckCustomConfig can // be specified. Not valid for PrivateDnsNamespaces. If you use healthCheck, you can only register IP instances to // this service. HealthCheck *HealthCheckConfig `field:"optional" json:"healthCheck" yaml:"healthCheck"` // A name for the Service. Name *string `field:"optional" json:"name" yaml:"name"` // The DNS type of the record that you want AWS Cloud Map to create. // // Supported record types // include A, AAAA, A and AAAA (A_AAAA), CNAME, and SRV. DnsRecordType DnsRecordType `field:"optional" json:"dnsRecordType" yaml:"dnsRecordType"` // The amount of time, in seconds, that you want DNS resolvers to cache the settings for this record. DnsTtl awscdk.Duration `field:"optional" json:"dnsTtl" yaml:"dnsTtl"` // Whether or not this service will have an Elastic LoadBalancer registered to it as an AliasTargetInstance. // // Setting this to `true` correctly configures the `routingPolicy` // and performs some additional validation. LoadBalancer *bool `field:"optional" json:"loadBalancer" yaml:"loadBalancer"` // The routing policy that you want to apply to all DNS records that AWS Cloud Map creates when you register an instance and specify this service. RoutingPolicy RoutingPolicy `field:"optional" json:"routingPolicy" yaml:"routingPolicy"` }
Service props needed to create a service in a given namespace.
Used by createService() for PrivateDnsNamespace and PublicDnsNamespace.
Example:
import cdk "github.com/aws/aws-cdk-go/awscdk" import servicediscovery "github.com/aws/aws-cdk-go/awscdk" app := cdk.NewApp() stack := cdk.NewStack(app, jsii.String("aws-servicediscovery-integ")) namespace := servicediscovery.NewPublicDnsNamespace(stack, jsii.String("Namespace"), &publicDnsNamespaceProps{ name: jsii.String("foobar.com"), }) service := namespace.createService(jsii.String("Service"), &dnsServiceProps{ name: jsii.String("foo"), dnsRecordType: servicediscovery.dnsRecordType_A, dnsTtl: cdk.duration.seconds(jsii.Number(30)), healthCheck: &healthCheckConfig{ type: servicediscovery.healthCheckType_HTTPS, resourcePath: jsii.String("/healthcheck"), failureThreshold: jsii.Number(2), }, }) service.registerIpInstance(jsii.String("IpInstance"), &ipInstanceBaseProps{ ipv4: jsii.String("54.239.25.192"), port: jsii.Number(443), }) app.synth()
type HealthCheckConfig ¶
type HealthCheckConfig struct { // The number of consecutive health checks that an endpoint must pass or fail for Route 53 to change the current status of the endpoint from unhealthy to healthy or vice versa. FailureThreshold *float64 `field:"optional" json:"failureThreshold" yaml:"failureThreshold"` // The path that you want Route 53 to request when performing health checks. // // Do not use when health check type is TCP. ResourcePath *string `field:"optional" json:"resourcePath" yaml:"resourcePath"` // The type of health check that you want to create, which indicates how Route 53 determines whether an endpoint is healthy. // // Cannot be modified once created. Supported values are HTTP, HTTPS, and TCP. Type HealthCheckType `field:"optional" json:"type" yaml:"type"` }
Settings for an optional Amazon Route 53 health check.
If you specify settings for a health check, AWS Cloud Map associates the health check with all the records that you specify in DnsConfig. Only valid with a PublicDnsNamespace.
Example:
import cdk "github.com/aws/aws-cdk-go/awscdk" import servicediscovery "github.com/aws/aws-cdk-go/awscdk" app := cdk.NewApp() stack := cdk.NewStack(app, jsii.String("aws-servicediscovery-integ")) namespace := servicediscovery.NewHttpNamespace(stack, jsii.String("MyNamespace"), &httpNamespaceProps{ name: jsii.String("MyHTTPNamespace"), }) service1 := namespace.createService(jsii.String("NonIpService"), &baseServiceProps{ description: jsii.String("service registering non-ip instances"), }) service1.registerNonIpInstance(jsii.String("NonIpInstance"), &nonIpInstanceBaseProps{ customAttributes: map[string]*string{ "arn": jsii.String("arn:aws:s3:::mybucket"), }, }) service2 := namespace.createService(jsii.String("IpService"), &baseServiceProps{ description: jsii.String("service registering ip instances"), healthCheck: &healthCheckConfig{ type: servicediscovery.healthCheckType_HTTP, resourcePath: jsii.String("/check"), }, }) service2.registerIpInstance(jsii.String("IpInstance"), &ipInstanceBaseProps{ ipv4: jsii.String("54.239.25.192"), }) app.synth()
type HealthCheckCustomConfig ¶
type HealthCheckCustomConfig struct { // The number of 30-second intervals that you want Cloud Map to wait after receiving an UpdateInstanceCustomHealthStatus request before it changes the health status of a service instance. FailureThreshold *float64 `field:"optional" json:"failureThreshold" yaml:"failureThreshold"` }
Specifies information about an optional custom health check.
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" healthCheckCustomConfig := &healthCheckCustomConfig{ failureThreshold: jsii.Number(123), }
type HealthCheckType ¶
type HealthCheckType string
Example:
import cdk "github.com/aws/aws-cdk-go/awscdk" import servicediscovery "github.com/aws/aws-cdk-go/awscdk" app := cdk.NewApp() stack := cdk.NewStack(app, jsii.String("aws-servicediscovery-integ")) namespace := servicediscovery.NewHttpNamespace(stack, jsii.String("MyNamespace"), &httpNamespaceProps{ name: jsii.String("MyHTTPNamespace"), }) service1 := namespace.createService(jsii.String("NonIpService"), &baseServiceProps{ description: jsii.String("service registering non-ip instances"), }) service1.registerNonIpInstance(jsii.String("NonIpInstance"), &nonIpInstanceBaseProps{ customAttributes: map[string]*string{ "arn": jsii.String("arn:aws:s3:::mybucket"), }, }) service2 := namespace.createService(jsii.String("IpService"), &baseServiceProps{ description: jsii.String("service registering ip instances"), healthCheck: &healthCheckConfig{ type: servicediscovery.healthCheckType_HTTP, resourcePath: jsii.String("/check"), }, }) service2.registerIpInstance(jsii.String("IpInstance"), &ipInstanceBaseProps{ ipv4: jsii.String("54.239.25.192"), }) app.synth()
const ( // Route 53 tries to establish a TCP connection. // // If successful, Route 53 submits an HTTP request and waits for an HTTP // status code of 200 or greater and less than 400. HealthCheckType_HTTP HealthCheckType = "HTTP" // Route 53 tries to establish a TCP connection. // // If successful, Route 53 submits an HTTPS request and waits for an // HTTP status code of 200 or greater and less than 400. If you specify HTTPS for the value of Type, the endpoint // must support TLS v1.0 or later. HealthCheckType_HTTPS HealthCheckType = "HTTPS" // Route 53 tries to establish a TCP connection. // // If you specify TCP for Type, don't specify a value for ResourcePath. HealthCheckType_TCP HealthCheckType = "TCP" )
type HttpNamespace ¶
type HttpNamespace interface { awscdk.Resource IHttpNamespace // 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 HttpNamespaceArn() *string HttpNamespaceId() *string HttpNamespaceName() *string // Namespace Arn for the namespace. NamespaceArn() *string // Namespace Id for the namespace. NamespaceId() *string // A name for the namespace. NamespaceName() *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 // Type of the namespace. Type() NamespaceType // 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) // Creates a service within the namespace. CreateService(id *string, props *BaseServiceProps) Service 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 }
Define an HTTP Namespace.
Example:
import cdk "github.com/aws/aws-cdk-go/awscdk" import servicediscovery "github.com/aws/aws-cdk-go/awscdk" app := cdk.NewApp() stack := cdk.NewStack(app, jsii.String("aws-servicediscovery-integ")) namespace := servicediscovery.NewHttpNamespace(stack, jsii.String("MyNamespace"), &httpNamespaceProps{ name: jsii.String("MyHTTPNamespace"), }) service1 := namespace.createService(jsii.String("NonIpService"), &baseServiceProps{ description: jsii.String("service registering non-ip instances"), }) service1.registerNonIpInstance(jsii.String("NonIpInstance"), &nonIpInstanceBaseProps{ customAttributes: map[string]*string{ "arn": jsii.String("arn:aws:s3:::mybucket"), }, }) service2 := namespace.createService(jsii.String("IpService"), &baseServiceProps{ description: jsii.String("service registering ip instances"), healthCheck: &healthCheckConfig{ type: servicediscovery.healthCheckType_HTTP, resourcePath: jsii.String("/check"), }, }) service2.registerIpInstance(jsii.String("IpInstance"), &ipInstanceBaseProps{ ipv4: jsii.String("54.239.25.192"), }) app.synth()
func NewHttpNamespace ¶
func NewHttpNamespace(scope constructs.Construct, id *string, props *HttpNamespaceProps) HttpNamespace
type HttpNamespaceAttributes ¶
type HttpNamespaceAttributes struct { // Namespace ARN for the Namespace. NamespaceArn *string `field:"required" json:"namespaceArn" yaml:"namespaceArn"` // Namespace Id for the Namespace. NamespaceId *string `field:"required" json:"namespaceId" yaml:"namespaceId"` // A name for the Namespace. NamespaceName *string `field:"required" json:"namespaceName" yaml:"namespaceName"` }
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" httpNamespaceAttributes := &httpNamespaceAttributes{ namespaceArn: jsii.String("namespaceArn"), namespaceId: jsii.String("namespaceId"), namespaceName: jsii.String("namespaceName"), }
type HttpNamespaceProps ¶
type HttpNamespaceProps struct { // A name for the Namespace. Name *string `field:"required" json:"name" yaml:"name"` // A description of the Namespace. Description *string `field:"optional" json:"description" yaml:"description"` }
Example:
import cdk "github.com/aws/aws-cdk-go/awscdk" import servicediscovery "github.com/aws/aws-cdk-go/awscdk" app := cdk.NewApp() stack := cdk.NewStack(app, jsii.String("aws-servicediscovery-integ")) namespace := servicediscovery.NewHttpNamespace(stack, jsii.String("MyNamespace"), &httpNamespaceProps{ name: jsii.String("MyHTTPNamespace"), }) service1 := namespace.createService(jsii.String("NonIpService"), &baseServiceProps{ description: jsii.String("service registering non-ip instances"), }) service1.registerNonIpInstance(jsii.String("NonIpInstance"), &nonIpInstanceBaseProps{ customAttributes: map[string]*string{ "arn": jsii.String("arn:aws:s3:::mybucket"), }, }) service2 := namespace.createService(jsii.String("IpService"), &baseServiceProps{ description: jsii.String("service registering ip instances"), healthCheck: &healthCheckConfig{ type: servicediscovery.healthCheckType_HTTP, resourcePath: jsii.String("/check"), }, }) service2.registerIpInstance(jsii.String("IpInstance"), &ipInstanceBaseProps{ ipv4: jsii.String("54.239.25.192"), }) app.synth()
type IHttpNamespace ¶
type IHttpNamespace interface { INamespace }
func HttpNamespace_FromHttpNamespaceAttributes ¶
func HttpNamespace_FromHttpNamespaceAttributes(scope constructs.Construct, id *string, attrs *HttpNamespaceAttributes) IHttpNamespace
type INamespace ¶
type INamespace interface { awscdk.IResource // Namespace ARN for the Namespace. NamespaceArn() *string // Namespace Id for the Namespace. NamespaceId() *string // A name for the Namespace. NamespaceName() *string // Type of Namespace. Type() NamespaceType }
type IPrivateDnsNamespace ¶
type IPrivateDnsNamespace interface { INamespace }
func PrivateDnsNamespace_FromPrivateDnsNamespaceAttributes ¶
func PrivateDnsNamespace_FromPrivateDnsNamespaceAttributes(scope constructs.Construct, id *string, attrs *PrivateDnsNamespaceAttributes) IPrivateDnsNamespace
type IPublicDnsNamespace ¶
type IPublicDnsNamespace interface { INamespace }
func PublicDnsNamespace_FromPublicDnsNamespaceAttributes ¶
func PublicDnsNamespace_FromPublicDnsNamespaceAttributes(scope constructs.Construct, id *string, attrs *PublicDnsNamespaceAttributes) IPublicDnsNamespace
type IService ¶
type IService interface { awscdk.IResource // The DnsRecordType used by the service. DnsRecordType() DnsRecordType // The namespace for the Cloudmap Service. Namespace() INamespace // The Routing Policy used by the service. RoutingPolicy() RoutingPolicy // The Arn of the namespace that you want to use for DNS configuration. ServiceArn() *string // The ID of the namespace that you want to use for DNS configuration. ServiceId() *string // A name for the Cloudmap Service. ServiceName() *string }
func Service_FromServiceAttributes ¶
func Service_FromServiceAttributes(scope constructs.Construct, id *string, attrs *ServiceAttributes) IService
type InstanceBase ¶
type InstanceBase interface { awscdk.Resource IInstance // 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 Id of the instance. InstanceId() *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 Cloudmap service to which the instance is registered. Service() IService // The stack in which this resource is defined. Stack() awscdk.Stack // 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 // Generate a unique instance Id that is safe to pass to CloudMap. UniqueInstanceId() *string }
type IpInstance ¶
type IpInstance interface { InstanceBase // 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 Id of the instance. InstanceId() *string // The Ipv4 address of the instance, or blank string if none available. Ipv4() *string // The Ipv6 address of the instance, or blank string if none available. Ipv6() *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 exposed port of the instance. Port() *float64 // The Cloudmap service to which the instance is registered. Service() IService // The stack in which this resource is defined. Stack() awscdk.Stack // 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 // Generate a unique instance Id that is safe to pass to CloudMap. UniqueInstanceId() *string }
Instance that is accessible using an IP address.
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 service service ipInstance := awscdk.Aws_servicediscovery.NewIpInstance(this, jsii.String("MyIpInstance"), &ipInstanceProps{ service: service, // the properties below are optional customAttributes: map[string]*string{ "customAttributesKey": jsii.String("customAttributes"), }, instanceId: jsii.String("instanceId"), ipv4: jsii.String("ipv4"), ipv6: jsii.String("ipv6"), port: jsii.Number(123), })
func NewIpInstance ¶
func NewIpInstance(scope constructs.Construct, id *string, props *IpInstanceProps) IpInstance
type IpInstanceBaseProps ¶
type IpInstanceBaseProps struct { // Custom attributes of the instance. CustomAttributes *map[string]*string `field:"optional" json:"customAttributes" yaml:"customAttributes"` // The id of the instance resource. InstanceId *string `field:"optional" json:"instanceId" yaml:"instanceId"` // If the service that you specify contains a template for an A record, the IPv4 address that you want AWS Cloud Map to use for the value of the A record. Ipv4 *string `field:"optional" json:"ipv4" yaml:"ipv4"` // If the service that you specify contains a template for an AAAA record, the IPv6 address that you want AWS Cloud Map to use for the value of the AAAA record. Ipv6 *string `field:"optional" json:"ipv6" yaml:"ipv6"` // The port on the endpoint that you want AWS Cloud Map to perform health checks on. // // This value is also used for // the port value in an SRV record if the service that you specify includes an SRV record. You can also specify a // default port that is applied to all instances in the Service configuration. Port *float64 `field:"optional" json:"port" yaml:"port"` }
Example:
import cdk "github.com/aws/aws-cdk-go/awscdk" import servicediscovery "github.com/aws/aws-cdk-go/awscdk" app := cdk.NewApp() stack := cdk.NewStack(app, jsii.String("aws-servicediscovery-integ")) namespace := servicediscovery.NewHttpNamespace(stack, jsii.String("MyNamespace"), &httpNamespaceProps{ name: jsii.String("MyHTTPNamespace"), }) service1 := namespace.createService(jsii.String("NonIpService"), &baseServiceProps{ description: jsii.String("service registering non-ip instances"), }) service1.registerNonIpInstance(jsii.String("NonIpInstance"), &nonIpInstanceBaseProps{ customAttributes: map[string]*string{ "arn": jsii.String("arn:aws:s3:::mybucket"), }, }) service2 := namespace.createService(jsii.String("IpService"), &baseServiceProps{ description: jsii.String("service registering ip instances"), healthCheck: &healthCheckConfig{ type: servicediscovery.healthCheckType_HTTP, resourcePath: jsii.String("/check"), }, }) service2.registerIpInstance(jsii.String("IpInstance"), &ipInstanceBaseProps{ ipv4: jsii.String("54.239.25.192"), }) app.synth()
type IpInstanceProps ¶
type IpInstanceProps struct { // Custom attributes of the instance. CustomAttributes *map[string]*string `field:"optional" json:"customAttributes" yaml:"customAttributes"` // The id of the instance resource. InstanceId *string `field:"optional" json:"instanceId" yaml:"instanceId"` // If the service that you specify contains a template for an A record, the IPv4 address that you want AWS Cloud Map to use for the value of the A record. Ipv4 *string `field:"optional" json:"ipv4" yaml:"ipv4"` // If the service that you specify contains a template for an AAAA record, the IPv6 address that you want AWS Cloud Map to use for the value of the AAAA record. Ipv6 *string `field:"optional" json:"ipv6" yaml:"ipv6"` // The port on the endpoint that you want AWS Cloud Map to perform health checks on. // // This value is also used for // the port value in an SRV record if the service that you specify includes an SRV record. You can also specify a // default port that is applied to all instances in the Service configuration. Port *float64 `field:"optional" json:"port" yaml:"port"` // The Cloudmap service this resource is registered to. Service IService `field:"required" json:"service" yaml:"service"` }
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 service service ipInstanceProps := &ipInstanceProps{ service: service, // the properties below are optional customAttributes: map[string]*string{ "customAttributesKey": jsii.String("customAttributes"), }, instanceId: jsii.String("instanceId"), ipv4: jsii.String("ipv4"), ipv6: jsii.String("ipv6"), port: jsii.Number(123), }
type NamespaceType ¶
type NamespaceType string
const ( // Choose this option if you want your application to use only API calls to discover registered instances. NamespaceType_HTTP NamespaceType = "HTTP" // Choose this option if you want your application to be able to discover instances using either API calls or using DNS queries in a VPC. NamespaceType_DNS_PRIVATE NamespaceType = "DNS_PRIVATE" // Choose this option if you want your application to be able to discover instances using either API calls or using public DNS queries. // // You aren't required to use both methods. NamespaceType_DNS_PUBLIC NamespaceType = "DNS_PUBLIC" )
type NonIpInstance ¶
type NonIpInstance interface { InstanceBase // 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 Id of the instance. InstanceId() *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 Cloudmap service to which the instance is registered. Service() IService // The stack in which this resource is defined. Stack() awscdk.Stack // 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 // Generate a unique instance Id that is safe to pass to CloudMap. UniqueInstanceId() *string }
Instance accessible using values other than an IP address or a domain name (CNAME).
Specify the other values in Custom attributes.
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 service service nonIpInstance := awscdk.Aws_servicediscovery.NewNonIpInstance(this, jsii.String("MyNonIpInstance"), &nonIpInstanceProps{ service: service, // the properties below are optional customAttributes: map[string]*string{ "customAttributesKey": jsii.String("customAttributes"), }, instanceId: jsii.String("instanceId"), })
func NewNonIpInstance ¶
func NewNonIpInstance(scope constructs.Construct, id *string, props *NonIpInstanceProps) NonIpInstance
type NonIpInstanceBaseProps ¶
type NonIpInstanceBaseProps struct { // Custom attributes of the instance. CustomAttributes *map[string]*string `field:"optional" json:"customAttributes" yaml:"customAttributes"` // The id of the instance resource. InstanceId *string `field:"optional" json:"instanceId" yaml:"instanceId"` }
Example:
import cdk "github.com/aws/aws-cdk-go/awscdk" import servicediscovery "github.com/aws/aws-cdk-go/awscdk" app := cdk.NewApp() stack := cdk.NewStack(app, jsii.String("aws-servicediscovery-integ")) namespace := servicediscovery.NewHttpNamespace(stack, jsii.String("MyNamespace"), &httpNamespaceProps{ name: jsii.String("MyHTTPNamespace"), }) service1 := namespace.createService(jsii.String("NonIpService"), &baseServiceProps{ description: jsii.String("service registering non-ip instances"), }) service1.registerNonIpInstance(jsii.String("NonIpInstance"), &nonIpInstanceBaseProps{ customAttributes: map[string]*string{ "arn": jsii.String("arn:aws:s3:::mybucket"), }, }) service2 := namespace.createService(jsii.String("IpService"), &baseServiceProps{ description: jsii.String("service registering ip instances"), healthCheck: &healthCheckConfig{ type: servicediscovery.healthCheckType_HTTP, resourcePath: jsii.String("/check"), }, }) service2.registerIpInstance(jsii.String("IpInstance"), &ipInstanceBaseProps{ ipv4: jsii.String("54.239.25.192"), }) app.synth()
type NonIpInstanceProps ¶
type NonIpInstanceProps struct { // Custom attributes of the instance. CustomAttributes *map[string]*string `field:"optional" json:"customAttributes" yaml:"customAttributes"` // The id of the instance resource. InstanceId *string `field:"optional" json:"instanceId" yaml:"instanceId"` // The Cloudmap service this resource is registered to. Service IService `field:"required" json:"service" yaml:"service"` }
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 service service nonIpInstanceProps := &nonIpInstanceProps{ service: service, // the properties below are optional customAttributes: map[string]*string{ "customAttributesKey": jsii.String("customAttributes"), }, instanceId: jsii.String("instanceId"), }
type PrivateDnsNamespace ¶
type PrivateDnsNamespace interface { awscdk.Resource IPrivateDnsNamespace // 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 // Namespace Arn of the namespace. NamespaceArn() *string // ID of hosted zone created by namespace. NamespaceHostedZoneId() *string // Namespace Id of the PrivateDnsNamespace. NamespaceId() *string // The name of the PrivateDnsNamespace. NamespaceName() *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 PrivateDnsNamespaceArn() *string PrivateDnsNamespaceId() *string PrivateDnsNamespaceName() *string // The stack in which this resource is defined. Stack() awscdk.Stack // Type of the namespace. Type() NamespaceType // 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) // Creates a service within the namespace. CreateService(id *string, props *DnsServiceProps) Service 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 }
Define a Service Discovery HTTP Namespace.
Example:
// Example automatically generated from non-compiling source. May contain errors. var mesh mesh // Cloud Map service discovery is currently required for host ejection by outlier detection vpc := ec2.NewVpc(this, jsii.String("vpc")) namespace := cloudmap.NewPrivateDnsNamespace(this, jsii.String("test-namespace"), &privateDnsNamespaceProps{ vpc: vpc, name: jsii.String("domain.local"), }) service := namespace.createService(jsii.String("Svc")) node := mesh.addVirtualNode(jsii.String("virtual-node"), &virtualNodeBaseProps{ serviceDiscovery: appmesh.serviceDiscovery.cloudMap(service), listeners: []virtualNodeListener{ appmesh.*virtualNodeListener.http(&httpVirtualNodeListenerOptions{ outlierDetection: &outlierDetection{ baseEjectionDuration: cdk.duration.seconds(jsii.Number(10)), interval: cdk.*duration.seconds(jsii.Number(30)), maxEjectionPercent: jsii.Number(50), maxServerErrors: jsii.Number(5), }, }), }, })
func NewPrivateDnsNamespace ¶
func NewPrivateDnsNamespace(scope constructs.Construct, id *string, props *PrivateDnsNamespaceProps) PrivateDnsNamespace
type PrivateDnsNamespaceAttributes ¶
type PrivateDnsNamespaceAttributes struct { // Namespace ARN for the Namespace. NamespaceArn *string `field:"required" json:"namespaceArn" yaml:"namespaceArn"` // Namespace Id for the Namespace. NamespaceId *string `field:"required" json:"namespaceId" yaml:"namespaceId"` // A name for the Namespace. NamespaceName *string `field:"required" json:"namespaceName" yaml:"namespaceName"` }
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" privateDnsNamespaceAttributes := &privateDnsNamespaceAttributes{ namespaceArn: jsii.String("namespaceArn"), namespaceId: jsii.String("namespaceId"), namespaceName: jsii.String("namespaceName"), }
type PrivateDnsNamespaceProps ¶
type PrivateDnsNamespaceProps struct { // A name for the Namespace. Name *string `field:"required" json:"name" yaml:"name"` // A description of the Namespace. Description *string `field:"optional" json:"description" yaml:"description"` // The Amazon VPC that you want to associate the namespace with. Vpc awsec2.IVpc `field:"required" json:"vpc" yaml:"vpc"` }
Example:
// Example automatically generated from non-compiling source. May contain errors. var mesh mesh // Cloud Map service discovery is currently required for host ejection by outlier detection vpc := ec2.NewVpc(this, jsii.String("vpc")) namespace := cloudmap.NewPrivateDnsNamespace(this, jsii.String("test-namespace"), &privateDnsNamespaceProps{ vpc: vpc, name: jsii.String("domain.local"), }) service := namespace.createService(jsii.String("Svc")) node := mesh.addVirtualNode(jsii.String("virtual-node"), &virtualNodeBaseProps{ serviceDiscovery: appmesh.serviceDiscovery.cloudMap(service), listeners: []virtualNodeListener{ appmesh.*virtualNodeListener.http(&httpVirtualNodeListenerOptions{ outlierDetection: &outlierDetection{ baseEjectionDuration: cdk.duration.seconds(jsii.Number(10)), interval: cdk.*duration.seconds(jsii.Number(30)), maxEjectionPercent: jsii.Number(50), maxServerErrors: jsii.Number(5), }, }), }, })
type PublicDnsNamespace ¶
type PublicDnsNamespace interface { awscdk.Resource IPublicDnsNamespace // 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 // Namespace Arn for the namespace. NamespaceArn() *string // ID of hosted zone created by namespace. NamespaceHostedZoneId() *string // Namespace Id for the namespace. NamespaceId() *string // A name for the namespace. NamespaceName() *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 PublicDnsNamespaceArn() *string PublicDnsNamespaceId() *string PublicDnsNamespaceName() *string // The stack in which this resource is defined. Stack() awscdk.Stack // Type of the namespace. Type() NamespaceType // 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) // Creates a service within the namespace. CreateService(id *string, props *DnsServiceProps) Service 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 }
Define a Public DNS Namespace.
Example:
import cdk "github.com/aws/aws-cdk-go/awscdk" import servicediscovery "github.com/aws/aws-cdk-go/awscdk" app := cdk.NewApp() stack := cdk.NewStack(app, jsii.String("aws-servicediscovery-integ")) namespace := servicediscovery.NewPublicDnsNamespace(stack, jsii.String("Namespace"), &publicDnsNamespaceProps{ name: jsii.String("foobar.com"), }) service := namespace.createService(jsii.String("Service"), &dnsServiceProps{ name: jsii.String("foo"), dnsRecordType: servicediscovery.dnsRecordType_A, dnsTtl: cdk.duration.seconds(jsii.Number(30)), healthCheck: &healthCheckConfig{ type: servicediscovery.healthCheckType_HTTPS, resourcePath: jsii.String("/healthcheck"), failureThreshold: jsii.Number(2), }, }) service.registerIpInstance(jsii.String("IpInstance"), &ipInstanceBaseProps{ ipv4: jsii.String("54.239.25.192"), port: jsii.Number(443), }) app.synth()
func NewPublicDnsNamespace ¶
func NewPublicDnsNamespace(scope constructs.Construct, id *string, props *PublicDnsNamespaceProps) PublicDnsNamespace
type PublicDnsNamespaceAttributes ¶
type PublicDnsNamespaceAttributes struct { // Namespace ARN for the Namespace. NamespaceArn *string `field:"required" json:"namespaceArn" yaml:"namespaceArn"` // Namespace Id for the Namespace. NamespaceId *string `field:"required" json:"namespaceId" yaml:"namespaceId"` // A name for the Namespace. NamespaceName *string `field:"required" json:"namespaceName" yaml:"namespaceName"` }
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" publicDnsNamespaceAttributes := &publicDnsNamespaceAttributes{ namespaceArn: jsii.String("namespaceArn"), namespaceId: jsii.String("namespaceId"), namespaceName: jsii.String("namespaceName"), }
type PublicDnsNamespaceProps ¶
type PublicDnsNamespaceProps struct { // A name for the Namespace. Name *string `field:"required" json:"name" yaml:"name"` // A description of the Namespace. Description *string `field:"optional" json:"description" yaml:"description"` }
Example:
import cdk "github.com/aws/aws-cdk-go/awscdk" import servicediscovery "github.com/aws/aws-cdk-go/awscdk" app := cdk.NewApp() stack := cdk.NewStack(app, jsii.String("aws-servicediscovery-integ")) namespace := servicediscovery.NewPublicDnsNamespace(stack, jsii.String("Namespace"), &publicDnsNamespaceProps{ name: jsii.String("foobar.com"), }) service := namespace.createService(jsii.String("Service"), &dnsServiceProps{ name: jsii.String("foo"), dnsRecordType: servicediscovery.dnsRecordType_A, dnsTtl: cdk.duration.seconds(jsii.Number(30)), healthCheck: &healthCheckConfig{ type: servicediscovery.healthCheckType_HTTPS, resourcePath: jsii.String("/healthcheck"), failureThreshold: jsii.Number(2), }, }) service.registerIpInstance(jsii.String("IpInstance"), &ipInstanceBaseProps{ ipv4: jsii.String("54.239.25.192"), port: jsii.Number(443), }) app.synth()
type RoutingPolicy ¶
type RoutingPolicy string
const ( // Route 53 returns the applicable value from one randomly selected instance from among the instances that you registered using the same service. RoutingPolicy_WEIGHTED RoutingPolicy = "WEIGHTED" // If you define a health check for the service and the health check is healthy, Route 53 returns the applicable value for up to eight instances. RoutingPolicy_MULTIVALUE RoutingPolicy = "MULTIVALUE" )
type Service ¶
type Service interface { awscdk.Resource IService // The DnsRecordType used by the service. DnsRecordType() DnsRecordType // 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 namespace for the Cloudmap Service. Namespace() INamespace // 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 Routing Policy used by the service. RoutingPolicy() RoutingPolicy // The Arn of the namespace that you want to use for DNS configuration. ServiceArn() *string // The ID of the namespace that you want to use for DNS configuration. ServiceId() *string // A name for the Cloudmap Service. ServiceName() *string // The stack in which this resource is defined. Stack() awscdk.Stack // 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 // Registers a resource that is accessible using a CNAME. RegisterCnameInstance(id *string, props *CnameInstanceBaseProps) IInstance // Registers a resource that is accessible using an IP address. RegisterIpInstance(id *string, props *IpInstanceBaseProps) IInstance // Registers an ELB as a new instance with unique name instanceId in this service. RegisterLoadBalancer(id *string, loadBalancer awselasticloadbalancingv2.ILoadBalancerV2, customAttributes *map[string]*string) IInstance // Registers a resource that is accessible using values other than an IP address or a domain name (CNAME). RegisterNonIpInstance(id *string, props *NonIpInstanceBaseProps) IInstance // Returns a string representation of this construct. ToString() *string }
Define a CloudMap Service.
Example:
import cdk "github.com/aws/aws-cdk-go/awscdk" import servicediscovery "github.com/aws/aws-cdk-go/awscdk" app := cdk.NewApp() stack := cdk.NewStack(app, jsii.String("aws-servicediscovery-integ")) namespace := servicediscovery.NewPublicDnsNamespace(stack, jsii.String("Namespace"), &publicDnsNamespaceProps{ name: jsii.String("foobar.com"), }) service := namespace.createService(jsii.String("Service"), &dnsServiceProps{ name: jsii.String("foo"), dnsRecordType: servicediscovery.dnsRecordType_A, dnsTtl: cdk.duration.seconds(jsii.Number(30)), healthCheck: &healthCheckConfig{ type: servicediscovery.healthCheckType_HTTPS, resourcePath: jsii.String("/healthcheck"), failureThreshold: jsii.Number(2), }, }) service.registerIpInstance(jsii.String("IpInstance"), &ipInstanceBaseProps{ ipv4: jsii.String("54.239.25.192"), port: jsii.Number(443), }) app.synth()
func NewService ¶
func NewService(scope constructs.Construct, id *string, props *ServiceProps) Service
type ServiceAttributes ¶
type ServiceAttributes struct { DnsRecordType DnsRecordType `field:"required" json:"dnsRecordType" yaml:"dnsRecordType"` Namespace INamespace `field:"required" json:"namespace" yaml:"namespace"` RoutingPolicy RoutingPolicy `field:"required" json:"routingPolicy" yaml:"routingPolicy"` ServiceArn *string `field:"required" json:"serviceArn" yaml:"serviceArn"` ServiceId *string `field:"required" json:"serviceId" yaml:"serviceId"` ServiceName *string `field:"required" json:"serviceName" yaml:"serviceName"` }
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 namespace iNamespace serviceAttributes := &serviceAttributes{ dnsRecordType: awscdk.Aws_servicediscovery.dnsRecordType_A, namespace: namespace, routingPolicy: awscdk.*Aws_servicediscovery.routingPolicy_WEIGHTED, serviceArn: jsii.String("serviceArn"), serviceId: jsii.String("serviceId"), serviceName: jsii.String("serviceName"), }
type ServiceProps ¶
type ServiceProps struct { // Structure containing failure threshold for a custom health checker. // // Only one of healthCheckConfig or healthCheckCustomConfig can be specified. // See: https://docs.aws.amazon.com/cloud-map/latest/api/API_HealthCheckCustomConfig.html CustomHealthCheck *HealthCheckCustomConfig `field:"optional" json:"customHealthCheck" yaml:"customHealthCheck"` // A description of the service. Description *string `field:"optional" json:"description" yaml:"description"` // Settings for an optional health check. // // If you specify health check settings, AWS Cloud Map associates the health // check with the records that you specify in DnsConfig. Only one of healthCheckConfig or healthCheckCustomConfig can // be specified. Not valid for PrivateDnsNamespaces. If you use healthCheck, you can only register IP instances to // this service. HealthCheck *HealthCheckConfig `field:"optional" json:"healthCheck" yaml:"healthCheck"` // A name for the Service. Name *string `field:"optional" json:"name" yaml:"name"` // The DNS type of the record that you want AWS Cloud Map to create. // // Supported record types // include A, AAAA, A and AAAA (A_AAAA), CNAME, and SRV. DnsRecordType DnsRecordType `field:"optional" json:"dnsRecordType" yaml:"dnsRecordType"` // The amount of time, in seconds, that you want DNS resolvers to cache the settings for this record. DnsTtl awscdk.Duration `field:"optional" json:"dnsTtl" yaml:"dnsTtl"` // Whether or not this service will have an Elastic LoadBalancer registered to it as an AliasTargetInstance. // // Setting this to `true` correctly configures the `routingPolicy` // and performs some additional validation. LoadBalancer *bool `field:"optional" json:"loadBalancer" yaml:"loadBalancer"` // The routing policy that you want to apply to all DNS records that AWS Cloud Map creates when you register an instance and specify this service. RoutingPolicy RoutingPolicy `field:"optional" json:"routingPolicy" yaml:"routingPolicy"` // The namespace that you want to use for DNS configuration. Namespace INamespace `field:"required" json:"namespace" yaml:"namespace"` }
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 namespace iNamespace serviceProps := &serviceProps{ namespace: namespace, // the properties below are optional customHealthCheck: &healthCheckCustomConfig{ failureThreshold: jsii.Number(123), }, description: jsii.String("description"), dnsRecordType: awscdk.Aws_servicediscovery.dnsRecordType_A, dnsTtl: cdk.duration.minutes(jsii.Number(30)), healthCheck: &healthCheckConfig{ failureThreshold: jsii.Number(123), resourcePath: jsii.String("resourcePath"), type: awscdk.*Aws_servicediscovery.healthCheckType_HTTP, }, loadBalancer: jsii.Boolean(false), name: jsii.String("name"), routingPolicy: awscdk.*Aws_servicediscovery.routingPolicy_WEIGHTED, }