# IComputeResource

- Module: [Aspire.Hosting](/reference/api/go/aspire.hosting.md)
- Version: `17.0.0`
- Kind: `handle`
- Source: [GitHub](https://github.com/microsoft/aspire/tree/bcfa151cdca6d0a573f22d5d9c23f9c727cb3b2f)

## Definition

```go
type IComputeResource interface{}
```

## Methods

- [WithComputeEnvironment](/reference/api/go/aspire.hosting/icomputeresource/withcomputeenvironment.md) -- `method` -- Configures the compute environment for the compute resource.
  ```go
  WithComputeEnvironment(computeEnvironmentResource ComputeEnvironmentResource) IComputeResource
  ```
- [WithImagePushOptions](/reference/api/go/aspire.hosting/icomputeresource/withimagepushoptions.md) -- `method` -- Adds an asynchronous callback to configure container image push options for the resource.
  ```go
  WithImagePushOptions(callback func(arg ContainerImagePushOptionsCallbackContext)) IComputeResource
  ```
- [WithRemoteImageName](/reference/api/go/aspire.hosting/icomputeresource/withremoteimagename.md) -- `method` -- Sets the remote image name (without registry endpoint or tag) for container push operations.
  ```go
  WithRemoteImageName(remoteImageName string) IComputeResource
  ```
- [WithRemoteImageTag](/reference/api/go/aspire.hosting/icomputeresource/withremoteimagetag.md) -- `method` -- Sets the remote image tag for container push operations.
  ```go
  WithRemoteImageTag(remoteImageTag string) IComputeResource
  ```
