Class CfnService
A CloudFormation AWS::ServiceDiscovery::Service
.
Inherited Members
Namespace: Amazon.CDK.AWS.ServiceDiscovery
Assembly: Amazon.CDK.AWS.ServiceDiscovery.dll
Syntax (csharp)
public class CfnService : CfnResource, IConstruct, IDependable, IInspectable
Syntax (vb)
Public Class CfnService
Inherits CfnResource
Implements IConstruct, IDependable, IInspectable
Remarks
A complex type that contains information about a service, which defines the configuration of the following entities:
CloudformationResource: AWS::ServiceDiscovery::Service
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.ServiceDiscovery;
var cfnService = new CfnService(this, "MyCfnService", new CfnServiceProps {
Description = "description",
DnsConfig = new DnsConfigProperty {
DnsRecords = new [] { new DnsRecordProperty {
Ttl = 123,
Type = "type"
} },
// the properties below are optional
NamespaceId = "namespaceId",
RoutingPolicy = "routingPolicy"
},
HealthCheckConfig = new HealthCheckConfigProperty {
Type = "type",
// the properties below are optional
FailureThreshold = 123,
ResourcePath = "resourcePath"
},
HealthCheckCustomConfig = new HealthCheckCustomConfigProperty {
FailureThreshold = 123
},
Name = "name",
NamespaceId = "namespaceId",
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} },
Type = "type"
});
Synopsis
Constructors
CfnService(Construct, String, ICfnServiceProps) | Create a new |
CfnService(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnService(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Properties
AttrArn | The Amazon Resource Name (ARN) of the service. |
AttrId | The ID of the service. |
AttrName | The name that you assigned to the service. |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
Description | The description of the service. |
DnsConfig | 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. |
HealthCheckConfig | 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 |
HealthCheckCustomConfig | A complex type that contains information about an optional custom health check. |
Name | The name of the service. |
NamespaceId | The ID of the namespace that was used to create the service. |
Tags | The tags for the service. |
Type | If present, specifies that the service instances are only discoverable using the |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnService(Construct, String, ICfnServiceProps)
Create a new AWS::ServiceDiscovery::Service
.
public CfnService(Construct scope, string id, ICfnServiceProps props = null)
Parameters
- scope Construct
- scope in which this resource is defined.
- id System.String
- scoped id of the resource.
- props ICfnServiceProps
- resource properties.
CfnService(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnService(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnService(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnService(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Properties
AttrArn
The Amazon Resource Name (ARN) of the service.
public virtual string AttrArn { get; }
Property Value
System.String
Remarks
CloudformationAttribute: Arn
AttrId
The ID of the service.
public virtual string AttrId { get; }
Property Value
System.String
Remarks
CloudformationAttribute: Id
AttrName
The name that you assigned to the service.
public virtual string AttrName { get; }
Property Value
System.String
Remarks
CloudformationAttribute: Name
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
Description
The description of the service.
public virtual string Description { get; set; }
Property Value
System.String
Remarks
DnsConfig
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.
public virtual object DnsConfig { get; set; }
Property Value
System.Object
Remarks
The record types of a service can only be changed by deleting the service and recreating it with a new Dnsconfig
.
HealthCheckConfig
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
.
public virtual object HealthCheckConfig { get; set; }
Property Value
System.Object
Remarks
For information about the charges for health checks, see Amazon Route 53 Pricing .
HealthCheckCustomConfig
A complex type that contains information about an optional custom health check.
public virtual object HealthCheckCustomConfig { get; set; }
Property Value
System.Object
Remarks
If you specify a health check configuration, you can specify either HealthCheckCustomConfig
or HealthCheckConfig
but not both.
Name
The name of the service.
public virtual string Name { get; set; }
Property Value
System.String
Remarks
NamespaceId
The ID of the namespace that was used to create the service.
public virtual string NamespaceId { get; set; }
Property Value
System.String
Remarks
You must specify a value for NamespaceId
either for the service properties or for DnsConfig . Don't specify a value in both places.
Tags
The tags for the service.
public virtual TagManager Tags { get; }
Property Value
Remarks
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
If present, specifies that the service instances are only discoverable using the DiscoverInstances
API operation.
public virtual string Type { get; set; }
Property Value
System.String
Remarks
No DNS records is registered for the service instances. The only valid value is HTTP
.
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
- tree inspector to collect and process attributes.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>