# IResourceWithEnvironment.withHttpsCertificateConfiguration

- Module: [Aspire.Hosting](/reference/api/typescript/aspire.hosting.md)
- Defined on: [IResourceWithEnvironment](/reference/api/typescript/aspire.hosting/iresourcewithenvironment.md)
- Version: `13.5.3`
- Kind: `method`

Adds a callback that allows configuring the resource to use a specific HTTPS/TLS certificate key pair for server authentication.

## Definition

```typescript
interface IResourceWithEnvironment {
  // ... omitted for brevity
  withHttpsCertificateConfiguration(callback: (arg: HttpsCertificateConfigurationCallbackAnnotationContext) => Promise<void>): IResourceWithEnvironment;
}
```

## Signature

```typescript
withHttpsCertificateConfiguration(callback: (arg: HttpsCertificateConfigurationCallbackAnnotationContext) => Promise<void>): IResourceWithEnvironment
```

## Parameters

- `callback` (`(arg: HttpsCertificateConfigurationCallbackAnnotationContext) => Promise<void>`)

## Returns

[IResourceWithEnvironment](/reference/api/typescript/aspire.hosting/iresourcewithenvironment.md) `builder`

## Defined on

- [IResourceWithEnvironment](/reference/api/typescript/aspire.hosting/iresourcewithenvironment.md) -- `interface`
