# AliasTargetInstanceProps

Extends: [BaseInstanceProps](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_servicediscovery.BaseInstanceProps.html)
Used as props by: [AliasTargetInstance](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_servicediscovery.AliasTargetInstance.html)

- Source: [`aws-servicediscovery/lib/alias-target-instance.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-servicediscovery/lib/alias-target-instance.ts#L16)

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_servicediscovery as servicediscovery } from 'aws-cdk-lib';

declare const service: servicediscovery.Service;
const aliasTargetInstanceProps: servicediscovery.AliasTargetInstanceProps = {
  dnsName: 'dnsName',
  service: service,

  // the properties below are optional
  customAttributes: {
    customAttributesKey: 'customAttributes',
  },
  instanceId: 'instanceId',
};
```

Python:

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

# service: servicediscovery.Service

alias_target_instance_props = servicediscovery.AliasTargetInstanceProps(
    dns_name="dnsName",
    service=service,

    # the properties below are optional
    custom_attributes={
        "custom_attributes_key": "customAttributes"
    },
    instance_id="instanceId"
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.servicediscovery.*;

Service service;

AliasTargetInstanceProps aliasTargetInstanceProps = AliasTargetInstanceProps.builder()
        .dnsName("dnsName")
        .service(service)

        // the properties below are optional
        .customAttributes(Map.of(
                "customAttributesKey", "customAttributes"))
        .instanceId("instanceId")
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.ServiceDiscovery;

Service service;

var aliasTargetInstanceProps = new AliasTargetInstanceProps {
    DnsName = "dnsName",
    Service = service,

    // the properties below are optional
    CustomAttributes = new Dictionary<string, string> {
        { "customAttributesKey", "customAttributes" }
    },
    InstanceId = "instanceId"
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// 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"),
}
```

## Properties

- `customAttributes`: { [key: string]: string } = none — Custom attributes of the instance.

- `dnsName`: string (required) — DNS name of the target.

- `instanceId`: string — The id of the instance resource.

  **Default:** Automatically generated name

- `service`: [IService](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_servicediscovery.IService.html) (required) — The Cloudmap service this resource is registered to.
