public CosmosContainer createContainer(final String name, final Long timeout, final String... partitionKey) {
        val database = client.getDatabase(properties.getDatabase());
        LOGGER.debug("Creating CosmosDb container [{}]", name);

        val partitionDefn = new PartitionKeyDefinition();
        partitionDefn.setPaths(Arrays.stream(partitionKey).map(key -> '/' + key).collect(Collectors.toList()));
        partitionDefn.setKind(PartitionKind.HASH);
        val containerProperties = new CosmosContainerProperties(name, partitionDefn);
        containerProperties.setIndexingPolicy(new IndexingPolicy()
            .setIndexingMode(IndexingMode.valueOf(properties.getIndexingMode())));
        containerProperties.setDefaultTimeToLiveInSeconds(timeout.intValue());
        val response = database.createContainerIfNotExists(containerProperties);
        LOGGER.debug("Created CosmosDb container [{}]", response.getProperties().getId());
        return getContainer(name);
    }
Create container.

@param name         the name
@param timeout      the timeout
@param partitionKey the partition key
@return the cosmos container
support/cas-server-support-cosmosdb-core/src/main/java/org/apereo/cas/cosmosdb/CosmosDbObjectFactory.java