Share via


CosmosClient.GetContainer(String, String) Methode

Definition

Gibt einen Proxyverweis auf einen Container zurück.

public virtual Microsoft.Azure.Cosmos.Container GetContainer (string databaseId, string containerId);
abstract member GetContainer : string * string -> Microsoft.Azure.Cosmos.Container
override this.GetContainer : string * string -> Microsoft.Azure.Cosmos.Container
Public Overridable Function GetContainer (databaseId As String, containerId As String) As Container

Parameter

databaseId
String

Cosmos-Datenbankname

containerId
String

Cosmos-Containername

Gibt zurück

Cosmos-Containerproxy

Hinweise

Container Der Proxyverweis garantiert die Existenz nicht. Stellen Sie sicher, dass der Container über CreateContainerAsync(ContainerProperties, Nullable<Int32>, RequestOptions, CancellationToken) oder CreateContainerIfNotExistsAsync(ContainerProperties, Nullable<Int32>, RequestOptions, CancellationToken)vorhanden ist, bevor Sie darauf arbeiten.

Gilt für: