<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "CloudKitJS",
  "identifier" : "/documentation/CloudKitJS/CloudKit/getContainer",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "CloudKit JS"
    ],
    "preciseIdentifier" : "instm/CloudKit/getContainer"
  },
  "title" : "getContainer"
}
-->

# getContainer

Returns the container with the specified container ID.

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

## Parameters

`containerIdentifier`

The identifier for the container you want to get.

## Return Value

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

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)