---
title: getContainer
framework: CloudKit JS
role: symbol
role_heading: Instance Method
platforms: [cloudkit js 1.0+]
path: cloudkitjs/cloudkit/getcontainer
---

# getContainer

Returns the container with the specified container ID.

## Declaration

```data
CloudKit.Container getContainer(
	String containerIdentifier
);
```

## Parameters

- `containerIdentifier`: The identifier for the container you want to get.

## Return Value

Return Value The container with the specified container ID if it exists; otherwise, the value is undefined.

## See Also

### Accessing Containers

- [getDefaultContainer](cloudkitjs/cloudkit/getdefaultcontainer.md)
- [getAllContainers](cloudkitjs/cloudkit/getallcontainers.md)
