CfnServiceProps

class aws_cdk.aws_servicediscovery.CfnServiceProps(*, description=None, dns_config=None, health_check_config=None, health_check_custom_config=None, name=None, namespace_id=None, tags=None, type=None)

Bases: object

Properties for defining a CfnService.

Parameters
  • description (Optional[str]) – The description of the service.

  • dns_config (Union[IResolvable, DnsConfigProperty, None]) – 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.

  • health_check_config (Union[IResolvable, HealthCheckConfigProperty, None]) – 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 .

  • health_check_custom_config (Union[IResolvable, HealthCheckCustomConfigProperty, None]) – A complex type that contains information about an optional custom health check. .. epigraph:: If you specify a health check configuration, you can specify either HealthCheckCustomConfig or HealthCheckConfig but not both.

  • name (Optional[str]) – The name of the service.

  • namespace_id (Optional[str]) – The ID of the namespace that was used to create the service. .. epigraph:: You must specify a value for NamespaceId either for the service properties or for DnsConfig . Don’t specify a value in both places.

  • tags (Optional[Sequence[CfnTag]]) – 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.

  • type (Optional[str]) – 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 .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-servicediscovery-service.html

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_servicediscovery as servicediscovery

cfn_service_props = servicediscovery.CfnServiceProps(
    description="description",
    dns_config=servicediscovery.CfnService.DnsConfigProperty(
        dns_records=[servicediscovery.CfnService.DnsRecordProperty(
            ttl=123,
            type="type"
        )],

        # the properties below are optional
        namespace_id="namespaceId",
        routing_policy="routingPolicy"
    ),
    health_check_config=servicediscovery.CfnService.HealthCheckConfigProperty(
        type="type",

        # the properties below are optional
        failure_threshold=123,
        resource_path="resourcePath"
    ),
    health_check_custom_config=servicediscovery.CfnService.HealthCheckCustomConfigProperty(
        failure_threshold=123
    ),
    name="name",
    namespace_id="namespaceId",
    tags=[CfnTag(
        key="key",
        value="value"
    )],
    type="type"
)

Attributes

description

The description of the service.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-servicediscovery-service.html#cfn-servicediscovery-service-description

Return type

Optional[str]

dns_config

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.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-servicediscovery-service.html#cfn-servicediscovery-service-dnsconfig

Return type

Union[IResolvable, DnsConfigProperty, None]

health_check_config

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 .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-servicediscovery-service.html#cfn-servicediscovery-service-healthcheckconfig

Return type

Union[IResolvable, HealthCheckConfigProperty, None]

health_check_custom_config

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.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-servicediscovery-service.html#cfn-servicediscovery-service-healthcheckcustomconfig

Return type

Union[IResolvable, HealthCheckCustomConfigProperty, None]

name

The name of the service.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-servicediscovery-service.html#cfn-servicediscovery-service-name

Return type

Optional[str]

namespace_id

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 . Don’t specify a value in both places.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-servicediscovery-service.html#cfn-servicediscovery-service-namespaceid

Return type

Optional[str]

tags

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.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-servicediscovery-service.html#cfn-servicediscovery-service-tags

Return type

Optional[List[CfnTag]]

type

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 .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-servicediscovery-service.html#cfn-servicediscovery-service-type

Return type

Optional[str]