azure-docs-sdk-java/docs-ref-autogen/com.azure.cosmos.CosmosData...

509 строки
51 KiB
YAML

### YamlMime:JavaType
uid: "com.azure.cosmos.CosmosDatabase"
fullName: "com.azure.cosmos.CosmosDatabase"
name: "CosmosDatabase"
nameWithType: "CosmosDatabase"
summary: "Perform read and delete databases, update database throughput, and perform operations on child resources in a synchronous way"
inheritances:
- "<xref href=\"java.lang.Object?displayProperty=fullName\" data-throw-if-not-resolved=\"False\" />"
inheritedClassMethods:
- classRef: "java.lang.<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html\">Object</a>"
methodsRef:
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--\">clone</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-\">equals</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--\">finalize</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--\">getClass</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--\">hashCode</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--\">notify</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--\">notifyAll</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--\">toString</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--\">wait</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-\">wait</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-\">wait</a>"
syntax: "public class **CosmosDatabase**"
methods:
- uid: "com.azure.cosmos.CosmosDatabase.createContainer(com.azure.cosmos.models.CosmosContainerProperties)"
fullName: "com.azure.cosmos.CosmosDatabase.createContainer(CosmosContainerProperties containerProperties)"
name: "createContainer(CosmosContainerProperties containerProperties)"
nameWithType: "CosmosDatabase.createContainer(CosmosContainerProperties containerProperties)"
summary: "Creates a Cosmos container."
parameters:
- description: "the <xref uid=\"com.azure.cosmos.models.CosmosContainerProperties\" data-throw-if-not-resolved=\"false\" data-raw-source=\"CosmosContainerProperties\"></xref>."
name: "containerProperties"
type: "<xref href=\"com.azure.cosmos.models.CosmosContainerProperties?alt=com.azure.cosmos.models.CosmosContainerProperties&text=CosmosContainerProperties\" data-throw-if-not-resolved=\"False\" />"
syntax: "public CosmosContainerResponse createContainer(CosmosContainerProperties containerProperties)"
desc: "Creates a Cosmos container.\n\n```java\nCosmosContainerProperties containerProperties =\n new CosmosContainerProperties(containerId, partitionKeyDefinition);\n try {\n CosmosContainerResponse container = cosmosDatabase.createContainer(containerProperties);\n } catch (CosmosException ce) {\n System.out.println(\"Failed to create container: \" + ce);\n }\n```"
returns:
description: "the <xref uid=\"com.azure.cosmos.models.CosmosContainerResponse\" data-throw-if-not-resolved=\"false\" data-raw-source=\"CosmosContainerResponse\"></xref> with the created container."
type: "<xref href=\"com.azure.cosmos.models.CosmosContainerResponse?alt=com.azure.cosmos.models.CosmosContainerResponse&text=CosmosContainerResponse\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.cosmos.CosmosDatabase.createContainer(com.azure.cosmos.models.CosmosContainerProperties,com.azure.cosmos.models.CosmosContainerRequestOptions)"
fullName: "com.azure.cosmos.CosmosDatabase.createContainer(CosmosContainerProperties containerProperties, CosmosContainerRequestOptions options)"
name: "createContainer(CosmosContainerProperties containerProperties, CosmosContainerRequestOptions options)"
nameWithType: "CosmosDatabase.createContainer(CosmosContainerProperties containerProperties, CosmosContainerRequestOptions options)"
summary: "Creates a Cosmos container while passing additional request options."
parameters:
- description: "the <xref uid=\"com.azure.cosmos.models.CosmosContainerProperties\" data-throw-if-not-resolved=\"false\" data-raw-source=\"CosmosContainerProperties\"></xref>."
name: "containerProperties"
type: "<xref href=\"com.azure.cosmos.models.CosmosContainerProperties?alt=com.azure.cosmos.models.CosmosContainerProperties&text=CosmosContainerProperties\" data-throw-if-not-resolved=\"False\" />"
- description: "the <xref uid=\"com.azure.cosmos.models.CosmosContainerProperties\" data-throw-if-not-resolved=\"false\" data-raw-source=\"CosmosContainerProperties\"></xref>."
name: "options"
type: "<xref href=\"com.azure.cosmos.models.CosmosContainerRequestOptions?alt=com.azure.cosmos.models.CosmosContainerRequestOptions&text=CosmosContainerRequestOptions\" data-throw-if-not-resolved=\"False\" />"
syntax: "public CosmosContainerResponse createContainer(CosmosContainerProperties containerProperties, CosmosContainerRequestOptions options)"
desc: "Creates a Cosmos container while passing additional request options.\n\n```java\nCosmosContainerProperties containerProperties =\n new CosmosContainerProperties(containerId, partitionKeyDefinition);\n try {\n CosmosContainerResponse container = cosmosDatabase.createContainer(containerProperties);\n } catch (CosmosException ce) {\n System.out.println(\"Failed to create container: \" + ce);\n }\n```"
returns:
description: "the <xref uid=\"com.azure.cosmos.models.CosmosContainerResponse\" data-throw-if-not-resolved=\"false\" data-raw-source=\"CosmosContainerResponse\"></xref> with the created container."
type: "<xref href=\"com.azure.cosmos.models.CosmosContainerResponse?alt=com.azure.cosmos.models.CosmosContainerResponse&text=CosmosContainerResponse\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.cosmos.CosmosDatabase.createContainer(com.azure.cosmos.models.CosmosContainerProperties,com.azure.cosmos.models.ThroughputProperties)"
fullName: "com.azure.cosmos.CosmosDatabase.createContainer(CosmosContainerProperties containerProperties, ThroughputProperties throughputProperties)"
name: "createContainer(CosmosContainerProperties containerProperties, ThroughputProperties throughputProperties)"
nameWithType: "CosmosDatabase.createContainer(CosmosContainerProperties containerProperties, ThroughputProperties throughputProperties)"
summary: "Creates a Cosmos container with custom throughput setting."
parameters:
- description: "the <xref uid=\"com.azure.cosmos.models.CosmosContainerProperties\" data-throw-if-not-resolved=\"false\" data-raw-source=\"CosmosContainerProperties\"></xref>."
name: "containerProperties"
type: "<xref href=\"com.azure.cosmos.models.CosmosContainerProperties?alt=com.azure.cosmos.models.CosmosContainerProperties&text=CosmosContainerProperties\" data-throw-if-not-resolved=\"False\" />"
- description: "the throughput properties."
name: "throughputProperties"
type: "<xref href=\"com.azure.cosmos.models.ThroughputProperties?alt=com.azure.cosmos.models.ThroughputProperties&text=ThroughputProperties\" data-throw-if-not-resolved=\"False\" />"
syntax: "public CosmosContainerResponse createContainer(CosmosContainerProperties containerProperties, ThroughputProperties throughputProperties)"
desc: "Creates a Cosmos container with custom throughput setting.\n\n```java\nCosmosContainerProperties containerProperties =\n new CosmosContainerProperties(containerId, partitionKeyDefinition);\n ThroughputProperties throughputProperties =\n ThroughputProperties.createAutoscaledThroughput(autoScaleMaxThroughput);\n try {\n CosmosContainerResponse container = cosmosDatabase.createContainer(\n containerProperties,\n throughputProperties\n );\n } catch (CosmosException ce) {\n System.out.println(\"Failed to create container: \" + ce);\n }\n```"
returns:
description: "the <xref uid=\"com.azure.cosmos.models.CosmosContainerResponse\" data-throw-if-not-resolved=\"false\" data-raw-source=\"CosmosContainerResponse\"></xref> with the created container."
type: "<xref href=\"com.azure.cosmos.models.CosmosContainerResponse?alt=com.azure.cosmos.models.CosmosContainerResponse&text=CosmosContainerResponse\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.cosmos.CosmosDatabase.createContainer(com.azure.cosmos.models.CosmosContainerProperties,com.azure.cosmos.models.ThroughputProperties,com.azure.cosmos.models.CosmosContainerRequestOptions)"
fullName: "com.azure.cosmos.CosmosDatabase.createContainer(CosmosContainerProperties containerProperties, ThroughputProperties throughputProperties, CosmosContainerRequestOptions options)"
name: "createContainer(CosmosContainerProperties containerProperties, ThroughputProperties throughputProperties, CosmosContainerRequestOptions options)"
nameWithType: "CosmosDatabase.createContainer(CosmosContainerProperties containerProperties, ThroughputProperties throughputProperties, CosmosContainerRequestOptions options)"
summary: "Creates a Cosmos container."
parameters:
- description: "the container properties."
name: "containerProperties"
type: "<xref href=\"com.azure.cosmos.models.CosmosContainerProperties?alt=com.azure.cosmos.models.CosmosContainerProperties&text=CosmosContainerProperties\" data-throw-if-not-resolved=\"False\" />"
- description: "the throughput properties."
name: "throughputProperties"
type: "<xref href=\"com.azure.cosmos.models.ThroughputProperties?alt=com.azure.cosmos.models.ThroughputProperties&text=ThroughputProperties\" data-throw-if-not-resolved=\"False\" />"
- description: "the options."
name: "options"
type: "<xref href=\"com.azure.cosmos.models.CosmosContainerRequestOptions?alt=com.azure.cosmos.models.CosmosContainerRequestOptions&text=CosmosContainerRequestOptions\" data-throw-if-not-resolved=\"False\" />"
syntax: "public CosmosContainerResponse createContainer(CosmosContainerProperties containerProperties, ThroughputProperties throughputProperties, CosmosContainerRequestOptions options)"
desc: "Creates a Cosmos container.\n\n```java\nCosmosContainerProperties containerProperties =\n new CosmosContainerProperties(containerId, partitionKeyDefinition);\n ThroughputProperties throughputProperties =\n ThroughputProperties.createAutoscaledThroughput(autoScaleMaxThroughput);\n try {\n CosmosContainerResponse container = cosmosDatabase.createContainer(\n containerProperties,\n throughputProperties\n );\n } catch (CosmosException ce) {\n System.out.println(\"Failed to create container: \" + ce);\n }\n```"
returns:
description: "the cosmos container response."
type: "<xref href=\"com.azure.cosmos.models.CosmosContainerResponse?alt=com.azure.cosmos.models.CosmosContainerResponse&text=CosmosContainerResponse\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.cosmos.CosmosDatabase.createContainer(java.lang.String,java.lang.String)"
fullName: "com.azure.cosmos.CosmosDatabase.createContainer(String id, String partitionKeyPath)"
name: "createContainer(String id, String partitionKeyPath)"
nameWithType: "CosmosDatabase.createContainer(String id, String partitionKeyPath)"
summary: "Create a Cosmos container."
parameters:
- description: "the container id."
name: "id"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "the partition key path."
name: "partitionKeyPath"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public CosmosContainerResponse createContainer(String id, String partitionKeyPath)"
desc: "Create a Cosmos container.\n\n```java\nThroughputProperties throughputProperties =\n ThroughputProperties.createAutoscaledThroughput(autoscaledThroughput);\n try {\n CosmosContainerResponse container = cosmosDatabase.createContainer(\n containerId,\n partitionKeyPath,\n throughputProperties\n );\n } catch (CosmosException ce) {\n System.out.println(\"Failed to create container: \" + ce);\n }\n```"
returns:
description: "the cosmos container response."
type: "<xref href=\"com.azure.cosmos.models.CosmosContainerResponse?alt=com.azure.cosmos.models.CosmosContainerResponse&text=CosmosContainerResponse\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.cosmos.CosmosDatabase.createContainer(java.lang.String,java.lang.String,com.azure.cosmos.models.ThroughputProperties)"
fullName: "com.azure.cosmos.CosmosDatabase.createContainer(String id, String partitionKeyPath, ThroughputProperties throughputProperties)"
name: "createContainer(String id, String partitionKeyPath, ThroughputProperties throughputProperties)"
nameWithType: "CosmosDatabase.createContainer(String id, String partitionKeyPath, ThroughputProperties throughputProperties)"
summary: "Create a Cosmos container."
parameters:
- description: "the id."
name: "id"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "the partition key path."
name: "partitionKeyPath"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "the throughput properties."
name: "throughputProperties"
type: "<xref href=\"com.azure.cosmos.models.ThroughputProperties?alt=com.azure.cosmos.models.ThroughputProperties&text=ThroughputProperties\" data-throw-if-not-resolved=\"False\" />"
syntax: "public CosmosContainerResponse createContainer(String id, String partitionKeyPath, ThroughputProperties throughputProperties)"
desc: "Create a Cosmos container.\n\n```java\nThroughputProperties throughputProperties =\n ThroughputProperties.createAutoscaledThroughput(autoscaledThroughput);\n try {\n CosmosContainerResponse container = cosmosDatabase.createContainer(\n containerId,\n partitionKeyPath,\n throughputProperties\n );\n } catch (CosmosException ce) {\n System.out.println(\"Failed to create container: \" + ce);\n }\n```"
returns:
description: "the cosmos container response."
type: "<xref href=\"com.azure.cosmos.models.CosmosContainerResponse?alt=com.azure.cosmos.models.CosmosContainerResponse&text=CosmosContainerResponse\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.cosmos.CosmosDatabase.createContainerIfNotExists(com.azure.cosmos.models.CosmosContainerProperties)"
fullName: "com.azure.cosmos.CosmosDatabase.createContainerIfNotExists(CosmosContainerProperties containerProperties)"
name: "createContainerIfNotExists(CosmosContainerProperties containerProperties)"
nameWithType: "CosmosDatabase.createContainerIfNotExists(CosmosContainerProperties containerProperties)"
summary: "Create container if one matching the id in the properties object does not exist."
parameters:
- description: "the container properties."
name: "containerProperties"
type: "<xref href=\"com.azure.cosmos.models.CosmosContainerProperties?alt=com.azure.cosmos.models.CosmosContainerProperties&text=CosmosContainerProperties\" data-throw-if-not-resolved=\"False\" />"
syntax: "public CosmosContainerResponse createContainerIfNotExists(CosmosContainerProperties containerProperties)"
desc: "Create container if one matching the id in the properties object does not exist.\n\n```java\nCosmosContainerProperties containerProperties =\n new CosmosContainerProperties(containerId, partitionKeyDefinition);\n CosmosContainerResponse container = cosmosDatabase.createContainerIfNotExists(containerProperties);\n```"
returns:
description: "the cosmos container response."
type: "<xref href=\"com.azure.cosmos.models.CosmosContainerResponse?alt=com.azure.cosmos.models.CosmosContainerResponse&text=CosmosContainerResponse\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.cosmos.CosmosDatabase.createContainerIfNotExists(com.azure.cosmos.models.CosmosContainerProperties,com.azure.cosmos.models.ThroughputProperties)"
fullName: "com.azure.cosmos.CosmosDatabase.createContainerIfNotExists(CosmosContainerProperties containerProperties, ThroughputProperties throughputProperties)"
name: "createContainerIfNotExists(CosmosContainerProperties containerProperties, ThroughputProperties throughputProperties)"
nameWithType: "CosmosDatabase.createContainerIfNotExists(CosmosContainerProperties containerProperties, ThroughputProperties throughputProperties)"
summary: "Creates a Cosmos container if one matching the id in the properties object does not exist."
parameters:
- description: "the container properties."
name: "containerProperties"
type: "<xref href=\"com.azure.cosmos.models.CosmosContainerProperties?alt=com.azure.cosmos.models.CosmosContainerProperties&text=CosmosContainerProperties\" data-throw-if-not-resolved=\"False\" />"
- description: "the throughput properties for the container."
name: "throughputProperties"
type: "<xref href=\"com.azure.cosmos.models.ThroughputProperties?alt=com.azure.cosmos.models.ThroughputProperties&text=ThroughputProperties\" data-throw-if-not-resolved=\"False\" />"
syntax: "public CosmosContainerResponse createContainerIfNotExists(CosmosContainerProperties containerProperties, ThroughputProperties throughputProperties)"
desc: "Creates a Cosmos container if one matching the id in the properties object does not exist.\n\n```java\nCosmosContainerProperties containerProperties =\n new CosmosContainerProperties(containerId, partitionKeyDefinition);\n ThroughputProperties throughputProperties =\n ThroughputProperties.createAutoscaledThroughput(autoScaleMaxThroughput);\n CosmosContainerResponse container = cosmosDatabase.createContainerIfNotExists(\n containerProperties,\n throughputProperties\n );\n```\n\nThe throughput properties will only be used if the specified container does not exist and therefor a new container will be created."
returns:
description: "the cosmos container response."
type: "<xref href=\"com.azure.cosmos.models.CosmosContainerResponse?alt=com.azure.cosmos.models.CosmosContainerResponse&text=CosmosContainerResponse\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.cosmos.CosmosDatabase.createContainerIfNotExists(java.lang.String,java.lang.String)"
fullName: "com.azure.cosmos.CosmosDatabase.createContainerIfNotExists(String id, String partitionKeyPath)"
name: "createContainerIfNotExists(String id, String partitionKeyPath)"
nameWithType: "CosmosDatabase.createContainerIfNotExists(String id, String partitionKeyPath)"
summary: "Creates a Cosmos container if one matching the id does not exist."
parameters:
- description: "the id."
name: "id"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "the partition key path."
name: "partitionKeyPath"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public CosmosContainerResponse createContainerIfNotExists(String id, String partitionKeyPath)"
desc: "Creates a Cosmos container if one matching the id does not exist.\n\n```java\nThroughputProperties throughputProperties =\n ThroughputProperties.createAutoscaledThroughput(autoscaledThroughput);\n CosmosContainerResponse container = cosmosDatabase.createContainerIfNotExists(\n containerId,\n partitionKeyPath,\n throughputProperties\n );\n```"
returns:
description: "the cosmos container response."
type: "<xref href=\"com.azure.cosmos.models.CosmosContainerResponse?alt=com.azure.cosmos.models.CosmosContainerResponse&text=CosmosContainerResponse\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.cosmos.CosmosDatabase.createContainerIfNotExists(java.lang.String,java.lang.String,com.azure.cosmos.models.ThroughputProperties)"
fullName: "com.azure.cosmos.CosmosDatabase.createContainerIfNotExists(String id, String partitionKeyPath, ThroughputProperties throughputProperties)"
name: "createContainerIfNotExists(String id, String partitionKeyPath, ThroughputProperties throughputProperties)"
nameWithType: "CosmosDatabase.createContainerIfNotExists(String id, String partitionKeyPath, ThroughputProperties throughputProperties)"
summary: "Creates a Cosmos container if one matching the id does not exist."
parameters:
- description: "the id."
name: "id"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "the partition key path."
name: "partitionKeyPath"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "the throughput properties for the container."
name: "throughputProperties"
type: "<xref href=\"com.azure.cosmos.models.ThroughputProperties?alt=com.azure.cosmos.models.ThroughputProperties&text=ThroughputProperties\" data-throw-if-not-resolved=\"False\" />"
syntax: "public CosmosContainerResponse createContainerIfNotExists(String id, String partitionKeyPath, ThroughputProperties throughputProperties)"
desc: "Creates a Cosmos container if one matching the id does not exist.\n\n```java\nThroughputProperties throughputProperties =\n ThroughputProperties.createAutoscaledThroughput(autoscaledThroughput);\n CosmosContainerResponse container = cosmosDatabase.createContainerIfNotExists(\n containerId,\n partitionKeyPath,\n throughputProperties\n );\n```\n\nThe throughput properties will only be used if the specified container does not exist and therefor a new container will be created."
returns:
description: "the cosmos container response."
type: "<xref href=\"com.azure.cosmos.models.CosmosContainerResponse?alt=com.azure.cosmos.models.CosmosContainerResponse&text=CosmosContainerResponse\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.cosmos.CosmosDatabase.createUser(com.azure.cosmos.models.CosmosUserProperties)"
fullName: "com.azure.cosmos.CosmosDatabase.createUser(CosmosUserProperties userProperties)"
name: "createUser(CosmosUserProperties userProperties)"
nameWithType: "CosmosDatabase.createUser(CosmosUserProperties userProperties)"
summary: "Create Cosmos user."
parameters:
- description: "the settings."
name: "userProperties"
type: "<xref href=\"com.azure.cosmos.models.CosmosUserProperties?alt=com.azure.cosmos.models.CosmosUserProperties&text=CosmosUserProperties\" data-throw-if-not-resolved=\"False\" />"
syntax: "public CosmosUserResponse createUser(CosmosUserProperties userProperties)"
desc: "Create Cosmos user.\n\n```java\nCosmosUserProperties userProperties = new CosmosUserProperties();\n userProperties.setId(userId);\n cosmosDatabase.createUser(userProperties);\n```"
returns:
description: "the cosmos user response."
type: "<xref href=\"com.azure.cosmos.models.CosmosUserResponse?alt=com.azure.cosmos.models.CosmosUserResponse&text=CosmosUserResponse\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.cosmos.CosmosDatabase.delete()"
fullName: "com.azure.cosmos.CosmosDatabase.delete()"
name: "delete()"
nameWithType: "CosmosDatabase.delete()"
summary: "Deletes the current Cosmos database."
syntax: "public CosmosDatabaseResponse delete()"
desc: "Deletes the current Cosmos database.\n\n```java\nCosmosDatabase cosmosDatabase = cosmosClient\n .getDatabase(\"<YOUR DATABASE NAME>\");\n CosmosDatabaseResponse deleteResponse = cosmosDatabase.delete();\n```"
returns:
description: "the <xref uid=\"com.azure.cosmos.models.CosmosDatabaseResponse\" data-throw-if-not-resolved=\"false\" data-raw-source=\"CosmosDatabaseResponse\"></xref>."
type: "<xref href=\"com.azure.cosmos.models.CosmosDatabaseResponse?alt=com.azure.cosmos.models.CosmosDatabaseResponse&text=CosmosDatabaseResponse\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.cosmos.CosmosDatabase.delete(com.azure.cosmos.models.CosmosDatabaseRequestOptions)"
fullName: "com.azure.cosmos.CosmosDatabase.delete(CosmosDatabaseRequestOptions options)"
name: "delete(CosmosDatabaseRequestOptions options)"
nameWithType: "CosmosDatabase.delete(CosmosDatabaseRequestOptions options)"
summary: "Delete the current Cosmos database while specifying additional request options."
parameters:
- description: "the <xref uid=\"com.azure.cosmos.models.CosmosDatabaseRequestOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"CosmosDatabaseRequestOptions\"></xref> request options."
name: "options"
type: "<xref href=\"com.azure.cosmos.models.CosmosDatabaseRequestOptions?alt=com.azure.cosmos.models.CosmosDatabaseRequestOptions&text=CosmosDatabaseRequestOptions\" data-throw-if-not-resolved=\"False\" />"
syntax: "public CosmosDatabaseResponse delete(CosmosDatabaseRequestOptions options)"
desc: "Delete the current Cosmos database while specifying additional request options.\n\n```java\nCosmosDatabase cosmosDatabase = cosmosClient\n .getDatabase(\"<YOUR DATABASE NAME>\");\n CosmosDatabaseResponse deleteResponse = cosmosDatabase.delete();\n```"
returns:
description: "the <xref uid=\"com.azure.cosmos.models.CosmosDatabaseResponse\" data-throw-if-not-resolved=\"false\" data-raw-source=\"CosmosDatabaseResponse\"></xref>."
type: "<xref href=\"com.azure.cosmos.models.CosmosDatabaseResponse?alt=com.azure.cosmos.models.CosmosDatabaseResponse&text=CosmosDatabaseResponse\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.cosmos.CosmosDatabase.getClientEncryptionKey(java.lang.String)"
fullName: "com.azure.cosmos.CosmosDatabase.getClientEncryptionKey(String id)"
name: "getClientEncryptionKey(String id)"
nameWithType: "CosmosDatabase.getClientEncryptionKey(String id)"
summary: "Gets a Cosmos<wbr>Client<wbr>Encryption<wbr>Key object without making a service call"
parameters:
- description: "id of the clientEncryptionKey"
name: "id"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public CosmosClientEncryptionKey getClientEncryptionKey(String id)"
desc: "Gets a CosmosClientEncryptionKey object without making a service call"
returns:
description: "Cosmos ClientEncryptionKey"
type: "<xref href=\"com.azure.cosmos.CosmosClientEncryptionKey?alt=com.azure.cosmos.CosmosClientEncryptionKey&text=CosmosClientEncryptionKey\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.cosmos.CosmosDatabase.getContainer(java.lang.String)"
fullName: "com.azure.cosmos.CosmosDatabase.getContainer(String id)"
name: "getContainer(String id)"
nameWithType: "CosmosDatabase.getContainer(String id)"
summary: "Gets a Cosmos container instance without making a service call."
parameters:
- description: "id of the container."
name: "id"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public CosmosContainer getContainer(String id)"
desc: "Gets a Cosmos container instance without making a service call.\n\nTo get the actual object a read operation must be performed first."
returns:
description: "Cosmos Container."
type: "<xref href=\"com.azure.cosmos.CosmosContainer?alt=com.azure.cosmos.CosmosContainer&text=CosmosContainer\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.cosmos.CosmosDatabase.getId()"
fullName: "com.azure.cosmos.CosmosDatabase.getId()"
name: "getId()"
nameWithType: "CosmosDatabase.getId()"
summary: "Get the id of the Cosmos database."
syntax: "public String getId()"
desc: "Get the id of the Cosmos database."
returns:
description: "the id of the database."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- uid: "com.azure.cosmos.CosmosDatabase.getUser(java.lang.String)"
fullName: "com.azure.cosmos.CosmosDatabase.getUser(String id)"
name: "getUser(String id)"
nameWithType: "CosmosDatabase.getUser(String id)"
summary: "Gets a Cosmos user instance without making a service call."
parameters:
- description: "the id."
name: "id"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public CosmosUser getUser(String id)"
desc: "Gets a Cosmos user instance without making a service call.\n\nTo get the actual object a read operation must be performed first."
returns:
description: "the user."
type: "<xref href=\"com.azure.cosmos.CosmosUser?alt=com.azure.cosmos.CosmosUser&text=CosmosUser\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.cosmos.CosmosDatabase.queryContainers(com.azure.cosmos.models.SqlQuerySpec)"
fullName: "com.azure.cosmos.CosmosDatabase.queryContainers(SqlQuerySpec querySpec)"
name: "queryContainers(SqlQuerySpec querySpec)"
nameWithType: "CosmosDatabase.queryContainers(SqlQuerySpec querySpec)"
summary: "Query containers in the current database."
parameters:
- description: "the query spec."
name: "querySpec"
type: "<xref href=\"com.azure.cosmos.models.SqlQuerySpec?alt=com.azure.cosmos.models.SqlQuerySpec&text=SqlQuerySpec\" data-throw-if-not-resolved=\"False\" />"
syntax: "public CosmosPagedIterable<CosmosContainerProperties> queryContainers(SqlQuerySpec querySpec)"
desc: "Query containers in the current database.\n\n```java\nCosmosPagedIterable<CosmosContainerProperties> cosmosContainersList =\n cosmosDatabase.queryContainers(\"SELECT * FROM DB_NAME\");\n cosmosContainersList.forEach(cosmosContainerProperties -> {\n System.out.println(cosmosContainerProperties);\n });\n```"
returns:
description: "the <xref uid=\"com.azure.cosmos.util.CosmosPagedIterable\" data-throw-if-not-resolved=\"false\" data-raw-source=\"CosmosPagedIterable\"></xref>."
type: "<xref href=\"com.azure.cosmos.util.CosmosPagedIterable?alt=com.azure.cosmos.util.CosmosPagedIterable&text=CosmosPagedIterable\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.cosmos.models.CosmosContainerProperties?alt=com.azure.cosmos.models.CosmosContainerProperties&text=CosmosContainerProperties\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.cosmos.CosmosDatabase.queryContainers(com.azure.cosmos.models.SqlQuerySpec,com.azure.cosmos.models.CosmosQueryRequestOptions)"
fullName: "com.azure.cosmos.CosmosDatabase.queryContainers(SqlQuerySpec querySpec, CosmosQueryRequestOptions options)"
name: "queryContainers(SqlQuerySpec querySpec, CosmosQueryRequestOptions options)"
nameWithType: "CosmosDatabase.queryContainers(SqlQuerySpec querySpec, CosmosQueryRequestOptions options)"
summary: "Query containers in the current database."
parameters:
- description: "the query spec."
name: "querySpec"
type: "<xref href=\"com.azure.cosmos.models.SqlQuerySpec?alt=com.azure.cosmos.models.SqlQuerySpec&text=SqlQuerySpec\" data-throw-if-not-resolved=\"False\" />"
- description: "the options."
name: "options"
type: "<xref href=\"com.azure.cosmos.models.CosmosQueryRequestOptions?alt=com.azure.cosmos.models.CosmosQueryRequestOptions&text=CosmosQueryRequestOptions\" data-throw-if-not-resolved=\"False\" />"
syntax: "public CosmosPagedIterable<CosmosContainerProperties> queryContainers(SqlQuerySpec querySpec, CosmosQueryRequestOptions options)"
desc: "Query containers in the current database.\n\n```java\nCosmosPagedIterable<CosmosContainerProperties> cosmosContainersList =\n cosmosDatabase.queryContainers(\"SELECT * FROM DB_NAME\");\n cosmosContainersList.forEach(cosmosContainerProperties -> {\n System.out.println(cosmosContainerProperties);\n });\n```"
returns:
description: "the <xref uid=\"com.azure.cosmos.util.CosmosPagedIterable\" data-throw-if-not-resolved=\"false\" data-raw-source=\"CosmosPagedIterable\"></xref>."
type: "<xref href=\"com.azure.cosmos.util.CosmosPagedIterable?alt=com.azure.cosmos.util.CosmosPagedIterable&text=CosmosPagedIterable\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.cosmos.models.CosmosContainerProperties?alt=com.azure.cosmos.models.CosmosContainerProperties&text=CosmosContainerProperties\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.cosmos.CosmosDatabase.queryContainers(java.lang.String)"
fullName: "com.azure.cosmos.CosmosDatabase.queryContainers(String query)"
name: "queryContainers(String query)"
nameWithType: "CosmosDatabase.queryContainers(String query)"
summary: "Query containers in the current database."
parameters:
- description: "the query."
name: "query"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public CosmosPagedIterable<CosmosContainerProperties> queryContainers(String query)"
desc: "Query containers in the current database.\n\n```java\nCosmosPagedIterable<CosmosContainerProperties> cosmosContainersList =\n cosmosDatabase.queryContainers(\"SELECT * FROM DB_NAME\");\n cosmosContainersList.forEach(cosmosContainerProperties -> {\n System.out.println(cosmosContainerProperties);\n });\n```"
returns:
description: "the <xref uid=\"com.azure.cosmos.util.CosmosPagedIterable\" data-throw-if-not-resolved=\"false\" data-raw-source=\"CosmosPagedIterable\"></xref>."
type: "<xref href=\"com.azure.cosmos.util.CosmosPagedIterable?alt=com.azure.cosmos.util.CosmosPagedIterable&text=CosmosPagedIterable\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.cosmos.models.CosmosContainerProperties?alt=com.azure.cosmos.models.CosmosContainerProperties&text=CosmosContainerProperties\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.cosmos.CosmosDatabase.queryContainers(java.lang.String,com.azure.cosmos.models.CosmosQueryRequestOptions)"
fullName: "com.azure.cosmos.CosmosDatabase.queryContainers(String query, CosmosQueryRequestOptions options)"
name: "queryContainers(String query, CosmosQueryRequestOptions options)"
nameWithType: "CosmosDatabase.queryContainers(String query, CosmosQueryRequestOptions options)"
summary: "Query containers iterator."
parameters:
- description: "the query."
name: "query"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "the options."
name: "options"
type: "<xref href=\"com.azure.cosmos.models.CosmosQueryRequestOptions?alt=com.azure.cosmos.models.CosmosQueryRequestOptions&text=CosmosQueryRequestOptions\" data-throw-if-not-resolved=\"False\" />"
syntax: "public CosmosPagedIterable<CosmosContainerProperties> queryContainers(String query, CosmosQueryRequestOptions options)"
desc: "Query containers iterator.\n\n```java\nCosmosPagedIterable<CosmosContainerProperties> cosmosContainersList =\n cosmosDatabase.queryContainers(\"SELECT * FROM DB_NAME\");\n cosmosContainersList.forEach(cosmosContainerProperties -> {\n System.out.println(cosmosContainerProperties);\n });\n```"
returns:
description: "the <xref uid=\"com.azure.cosmos.util.CosmosPagedIterable\" data-throw-if-not-resolved=\"false\" data-raw-source=\"CosmosPagedIterable\"></xref>."
type: "<xref href=\"com.azure.cosmos.util.CosmosPagedIterable?alt=com.azure.cosmos.util.CosmosPagedIterable&text=CosmosPagedIterable\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.cosmos.models.CosmosContainerProperties?alt=com.azure.cosmos.models.CosmosContainerProperties&text=CosmosContainerProperties\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.cosmos.CosmosDatabase.queryUsers(com.azure.cosmos.models.SqlQuerySpec)"
fullName: "com.azure.cosmos.CosmosDatabase.queryUsers(SqlQuerySpec querySpec)"
name: "queryUsers(SqlQuerySpec querySpec)"
nameWithType: "CosmosDatabase.queryUsers(SqlQuerySpec querySpec)"
summary: "Query all Cosmos users for the current database."
parameters:
- description: "the query spec."
name: "querySpec"
type: "<xref href=\"com.azure.cosmos.models.SqlQuerySpec?alt=com.azure.cosmos.models.SqlQuerySpec&text=SqlQuerySpec\" data-throw-if-not-resolved=\"False\" />"
syntax: "public CosmosPagedIterable<CosmosUserProperties> queryUsers(SqlQuerySpec querySpec)"
desc: "Query all Cosmos users for the current database.\n\n```java\nCosmosPagedIterable<CosmosUserProperties> userPropertiesList =\n cosmosDatabase.queryUsers(\"SELECT * FROM DB_NAME\");\n userPropertiesList.forEach(userProperties -> {\n System.out.println(userProperties);\n });\n```"
returns:
description: "the <xref uid=\"com.azure.cosmos.util.CosmosPagedIterable\" data-throw-if-not-resolved=\"false\" data-raw-source=\"CosmosPagedIterable\"></xref>."
type: "<xref href=\"com.azure.cosmos.util.CosmosPagedIterable?alt=com.azure.cosmos.util.CosmosPagedIterable&text=CosmosPagedIterable\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.cosmos.models.CosmosUserProperties?alt=com.azure.cosmos.models.CosmosUserProperties&text=CosmosUserProperties\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.cosmos.CosmosDatabase.queryUsers(com.azure.cosmos.models.SqlQuerySpec,com.azure.cosmos.models.CosmosQueryRequestOptions)"
fullName: "com.azure.cosmos.CosmosDatabase.queryUsers(SqlQuerySpec querySpec, CosmosQueryRequestOptions options)"
name: "queryUsers(SqlQuerySpec querySpec, CosmosQueryRequestOptions options)"
nameWithType: "CosmosDatabase.queryUsers(SqlQuerySpec querySpec, CosmosQueryRequestOptions options)"
summary: "Query all Cosmos users for the current database."
parameters:
- description: "the query spec."
name: "querySpec"
type: "<xref href=\"com.azure.cosmos.models.SqlQuerySpec?alt=com.azure.cosmos.models.SqlQuerySpec&text=SqlQuerySpec\" data-throw-if-not-resolved=\"False\" />"
- description: "the options."
name: "options"
type: "<xref href=\"com.azure.cosmos.models.CosmosQueryRequestOptions?alt=com.azure.cosmos.models.CosmosQueryRequestOptions&text=CosmosQueryRequestOptions\" data-throw-if-not-resolved=\"False\" />"
syntax: "public CosmosPagedIterable<CosmosUserProperties> queryUsers(SqlQuerySpec querySpec, CosmosQueryRequestOptions options)"
desc: "Query all Cosmos users for the current database.\n\n```java\nCosmosPagedIterable<CosmosUserProperties> userPropertiesList =\n cosmosDatabase.queryUsers(\"SELECT * FROM DB_NAME\");\n userPropertiesList.forEach(userProperties -> {\n System.out.println(userProperties);\n });\n```"
returns:
description: "the <xref uid=\"com.azure.cosmos.util.CosmosPagedIterable\" data-throw-if-not-resolved=\"false\" data-raw-source=\"CosmosPagedIterable\"></xref>."
type: "<xref href=\"com.azure.cosmos.util.CosmosPagedIterable?alt=com.azure.cosmos.util.CosmosPagedIterable&text=CosmosPagedIterable\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.cosmos.models.CosmosUserProperties?alt=com.azure.cosmos.models.CosmosUserProperties&text=CosmosUserProperties\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.cosmos.CosmosDatabase.queryUsers(java.lang.String)"
fullName: "com.azure.cosmos.CosmosDatabase.queryUsers(String query)"
name: "queryUsers(String query)"
nameWithType: "CosmosDatabase.queryUsers(String query)"
summary: "Query all Cosmos users for the current database."
parameters:
- description: "the query."
name: "query"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public CosmosPagedIterable<CosmosUserProperties> queryUsers(String query)"
desc: "Query all Cosmos users for the current database.\n\n```java\nCosmosPagedIterable<CosmosUserProperties> userPropertiesList =\n cosmosDatabase.queryUsers(\"SELECT * FROM DB_NAME\");\n userPropertiesList.forEach(userProperties -> {\n System.out.println(userProperties);\n });\n```"
returns:
description: "the <xref uid=\"com.azure.cosmos.util.CosmosPagedIterable\" data-throw-if-not-resolved=\"false\" data-raw-source=\"CosmosPagedIterable\"></xref>."
type: "<xref href=\"com.azure.cosmos.util.CosmosPagedIterable?alt=com.azure.cosmos.util.CosmosPagedIterable&text=CosmosPagedIterable\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.cosmos.models.CosmosUserProperties?alt=com.azure.cosmos.models.CosmosUserProperties&text=CosmosUserProperties\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.cosmos.CosmosDatabase.queryUsers(java.lang.String,com.azure.cosmos.models.CosmosQueryRequestOptions)"
fullName: "com.azure.cosmos.CosmosDatabase.queryUsers(String query, CosmosQueryRequestOptions options)"
name: "queryUsers(String query, CosmosQueryRequestOptions options)"
nameWithType: "CosmosDatabase.queryUsers(String query, CosmosQueryRequestOptions options)"
summary: "Query all Cosmos users for the current database."
parameters:
- description: "the query."
name: "query"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "the options."
name: "options"
type: "<xref href=\"com.azure.cosmos.models.CosmosQueryRequestOptions?alt=com.azure.cosmos.models.CosmosQueryRequestOptions&text=CosmosQueryRequestOptions\" data-throw-if-not-resolved=\"False\" />"
syntax: "public CosmosPagedIterable<CosmosUserProperties> queryUsers(String query, CosmosQueryRequestOptions options)"
desc: "Query all Cosmos users for the current database.\n\n```java\nCosmosPagedIterable<CosmosUserProperties> userPropertiesList =\n cosmosDatabase.queryUsers(\"SELECT * FROM DB_NAME\");\n userPropertiesList.forEach(userProperties -> {\n System.out.println(userProperties);\n });\n```"
returns:
description: "the <xref uid=\"com.azure.cosmos.util.CosmosPagedIterable\" data-throw-if-not-resolved=\"false\" data-raw-source=\"CosmosPagedIterable\"></xref>."
type: "<xref href=\"com.azure.cosmos.util.CosmosPagedIterable?alt=com.azure.cosmos.util.CosmosPagedIterable&text=CosmosPagedIterable\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.cosmos.models.CosmosUserProperties?alt=com.azure.cosmos.models.CosmosUserProperties&text=CosmosUserProperties\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.cosmos.CosmosDatabase.read()"
fullName: "com.azure.cosmos.CosmosDatabase.read()"
name: "read()"
nameWithType: "CosmosDatabase.read()"
summary: "Reads the current Cosmos database."
syntax: "public CosmosDatabaseResponse read()"
desc: "Reads the current Cosmos database. Fetch the details and properties of a database based on its unique identifier.\n\n```java\nCosmosDatabase cosmosDatabase = cosmosClient\n .getDatabase(\"<YOUR DATABASE NAME>\");\n CosmosDatabaseResponse readResponse = cosmosDatabase.read();\n```"
returns:
description: "the <xref uid=\"com.azure.cosmos.models.CosmosDatabaseResponse\" data-throw-if-not-resolved=\"false\" data-raw-source=\"CosmosDatabaseResponse\"></xref>."
type: "<xref href=\"com.azure.cosmos.models.CosmosDatabaseResponse?alt=com.azure.cosmos.models.CosmosDatabaseResponse&text=CosmosDatabaseResponse\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.cosmos.CosmosDatabase.read(com.azure.cosmos.models.CosmosDatabaseRequestOptions)"
fullName: "com.azure.cosmos.CosmosDatabase.read(CosmosDatabaseRequestOptions options)"
name: "read(CosmosDatabaseRequestOptions options)"
nameWithType: "CosmosDatabase.read(CosmosDatabaseRequestOptions options)"
summary: "Reads the current Cosmos database while specifying additional request options."
parameters:
- description: "the <xref uid=\"com.azure.cosmos.models.CosmosDatabaseRequestOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"CosmosDatabaseRequestOptions\"></xref> request options."
name: "options"
type: "<xref href=\"com.azure.cosmos.models.CosmosDatabaseRequestOptions?alt=com.azure.cosmos.models.CosmosDatabaseRequestOptions&text=CosmosDatabaseRequestOptions\" data-throw-if-not-resolved=\"False\" />"
syntax: "public CosmosDatabaseResponse read(CosmosDatabaseRequestOptions options)"
desc: "Reads the current Cosmos database while specifying additional request options. Fetch the details and properties of a database based on its unique identifier.\n\n```java\nCosmosDatabase cosmosDatabase = cosmosClient\n .getDatabase(\"<YOUR DATABASE NAME>\");\n CosmosDatabaseResponse readResponse = cosmosDatabase.read();\n```"
returns:
description: "the <xref uid=\"com.azure.cosmos.models.CosmosDatabaseResponse\" data-throw-if-not-resolved=\"false\" data-raw-source=\"CosmosDatabaseResponse\"></xref>"
type: "<xref href=\"com.azure.cosmos.models.CosmosDatabaseResponse?alt=com.azure.cosmos.models.CosmosDatabaseResponse&text=CosmosDatabaseResponse\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.cosmos.CosmosDatabase.readAllClientEncryptionKeys()"
fullName: "com.azure.cosmos.CosmosDatabase.readAllClientEncryptionKeys()"
name: "readAllClientEncryptionKeys()"
nameWithType: "CosmosDatabase.readAllClientEncryptionKeys()"
summary: "Reads all cosmos client encryption keys in a database."
syntax: "public CosmosPagedIterable<CosmosClientEncryptionKeyProperties> readAllClientEncryptionKeys()"
desc: "Reads all cosmos client encryption keys in a database.\n\n```java\nCosmosPagedIterable<CosmosClientEncryptionKeyProperties> clientEncryptionKeys =\n cosmosDatabase.readAllClientEncryptionKeys();\n clientEncryptionKeys.forEach(encryptionKeyProperties ->\n System.out.println(clientEncryptionKeys)\n );\n```"
returns:
description: "a <xref uid=\"com.azure.cosmos.util.CosmosPagedIterable\" data-throw-if-not-resolved=\"false\" data-raw-source=\"CosmosPagedIterable\"></xref>."
type: "<xref href=\"com.azure.cosmos.util.CosmosPagedIterable?alt=com.azure.cosmos.util.CosmosPagedIterable&text=CosmosPagedIterable\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.cosmos.models.CosmosClientEncryptionKeyProperties?alt=com.azure.cosmos.models.CosmosClientEncryptionKeyProperties&text=CosmosClientEncryptionKeyProperties\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.cosmos.CosmosDatabase.readAllContainers()"
fullName: "com.azure.cosmos.CosmosDatabase.readAllContainers()"
name: "readAllContainers()"
nameWithType: "CosmosDatabase.readAllContainers()"
summary: "Read all containers in the current database."
syntax: "public CosmosPagedIterable<CosmosContainerProperties> readAllContainers()"
desc: "Read all containers in the current database.\n\n```java\nCosmosPagedIterable<CosmosContainerProperties> cosmosContainersList =\n cosmosDatabase.readAllContainers();\n cosmosContainersList.forEach(cosmosContainerProperties -> {\n System.out.println(cosmosContainerProperties);\n });\n```"
returns:
description: "the <xref uid=\"com.azure.cosmos.util.CosmosPagedIterable\" data-throw-if-not-resolved=\"false\" data-raw-source=\"CosmosPagedIterable\"></xref>."
type: "<xref href=\"com.azure.cosmos.util.CosmosPagedIterable?alt=com.azure.cosmos.util.CosmosPagedIterable&text=CosmosPagedIterable\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.cosmos.models.CosmosContainerProperties?alt=com.azure.cosmos.models.CosmosContainerProperties&text=CosmosContainerProperties\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.cosmos.CosmosDatabase.readAllUsers()"
fullName: "com.azure.cosmos.CosmosDatabase.readAllUsers()"
name: "readAllUsers()"
nameWithType: "CosmosDatabase.readAllUsers()"
summary: "Read all Cosmos users for the current database."
syntax: "public CosmosPagedIterable<CosmosUserProperties> readAllUsers()"
desc: "Read all Cosmos users for the current database.\n\n```java\nCosmosPagedIterable<CosmosUserProperties> cosmosUserProperties = cosmosDatabase.readAllUsers();\n cosmosUserProperties.forEach(userProperties -> {\n System.out.println(userProperties);\n });\n```"
returns:
description: "the <xref uid=\"com.azure.cosmos.util.CosmosPagedIterable\" data-throw-if-not-resolved=\"false\" data-raw-source=\"CosmosPagedIterable\"></xref>."
type: "<xref href=\"com.azure.cosmos.util.CosmosPagedIterable?alt=com.azure.cosmos.util.CosmosPagedIterable&text=CosmosPagedIterable\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"com.azure.cosmos.models.CosmosUserProperties?alt=com.azure.cosmos.models.CosmosUserProperties&text=CosmosUserProperties\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.cosmos.CosmosDatabase.readThroughput()"
fullName: "com.azure.cosmos.CosmosDatabase.readThroughput()"
name: "readThroughput()"
nameWithType: "CosmosDatabase.readThroughput()"
summary: "Gets the throughput of the current database."
syntax: "public ThroughputResponse readThroughput()"
desc: "Gets the throughput of the current database.\n\n```java\nThroughputResponse throughputResponse = cosmosDatabase.readThroughput();\n System.out.println(throughputResponse);\n```"
returns:
description: "the throughput response."
type: "<xref href=\"com.azure.cosmos.models.ThroughputResponse?alt=com.azure.cosmos.models.ThroughputResponse&text=ThroughputResponse\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.cosmos.CosmosDatabase.replaceThroughput(com.azure.cosmos.models.ThroughputProperties)"
fullName: "com.azure.cosmos.CosmosDatabase.replaceThroughput(ThroughputProperties throughputProperties)"
name: "replaceThroughput(ThroughputProperties throughputProperties)"
nameWithType: "CosmosDatabase.replaceThroughput(ThroughputProperties throughputProperties)"
summary: "Sets the throughput of the current database."
parameters:
- description: "the throughput properties."
name: "throughputProperties"
type: "<xref href=\"com.azure.cosmos.models.ThroughputProperties?alt=com.azure.cosmos.models.ThroughputProperties&text=ThroughputProperties\" data-throw-if-not-resolved=\"False\" />"
syntax: "public ThroughputResponse replaceThroughput(ThroughputProperties throughputProperties)"
desc: "Sets the throughput of the current database.\n\n```java\nThroughputProperties throughputProperties = ThroughputProperties\n .createAutoscaledThroughput(autoScaleMaxThroughput);\n\n ThroughputResponse throughputResponse = cosmosDatabase.replaceThroughput(throughputProperties);\n System.out.println(throughputResponse);\n```"
returns:
description: "the throughput response."
type: "<xref href=\"com.azure.cosmos.models.ThroughputResponse?alt=com.azure.cosmos.models.ThroughputResponse&text=ThroughputResponse\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.cosmos.CosmosDatabase.upsertUser(com.azure.cosmos.models.CosmosUserProperties)"
fullName: "com.azure.cosmos.CosmosDatabase.upsertUser(CosmosUserProperties userProperties)"
name: "upsertUser(CosmosUserProperties userProperties)"
nameWithType: "CosmosDatabase.upsertUser(CosmosUserProperties userProperties)"
summary: "Upserts a Cosmos user."
parameters:
- description: "the settings."
name: "userProperties"
type: "<xref href=\"com.azure.cosmos.models.CosmosUserProperties?alt=com.azure.cosmos.models.CosmosUserProperties&text=CosmosUserProperties\" data-throw-if-not-resolved=\"False\" />"
syntax: "public CosmosUserResponse upsertUser(CosmosUserProperties userProperties)"
desc: "Upserts a Cosmos user.\n\n```java\nCosmosUserProperties userProperties = new CosmosUserProperties();\n userProperties.setId(userId);\n cosmosDatabase.upsertUser(userProperties);\n```"
returns:
description: "the cosmos user response."
type: "<xref href=\"com.azure.cosmos.models.CosmosUserResponse?alt=com.azure.cosmos.models.CosmosUserResponse&text=CosmosUserResponse\" data-throw-if-not-resolved=\"False\" />"
type: "class"
desc: "Perform read and delete databases, update database throughput, and perform operations on child resources in a synchronous way"
metadata: {}
package: "com.azure.cosmos"
artifact: com.azure:azure-cosmos:4.63.3