CollectionsOperations Class
CollectionsOperations operations.
You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute.
- Inheritance
-
builtins.objectCollectionsOperations
Constructor
CollectionsOperations(client, config, serializer, deserializer)
Parameters
- client
Client for service requests.
- config
Configuration of service client.
- serializer
An object model serializer.
- deserializer
An object model deserializer.
Methods
| create_or_update_collection |
Creates or updates a collection entity. |
| delete_collection |
Deletes a Collection entity. |
| get_collection |
Get a collection. |
| get_collection_path |
Gets the parent name and parent friendly name chains that represent the collection path. |
| list_child_collection_names |
Lists the child collections names in the collection. |
| list_collections |
List the collections in the account. |
create_or_update_collection
Creates or updates a collection entity.
create_or_update_collection(collection_name: str, collection: Any, **kwargs: Any) -> Any
Parameters
- collection_name
- str
- collection
- <xref:Any>
Returns
JSON object
Return type
Exceptions
Examples
# JSON input template you can fill out and use as your body input.
collection = {
"collectionProvisioningState": "str", # Optional. Gets the state of the provisioning. Possible values include: "Unknown", "Creating", "Moving", "Deleting", "Failed", "Succeeded".
"description": "str", # Optional. Gets or sets the description.
"friendlyName": "str", # Optional. Gets or sets the friendly name of the collection.
"name": "str", # Optional. Gets the name.
"parentCollection": {
"referenceName": "str", # Optional. Gets or sets the reference name.
"type": "CollectionReference" # Optional. Default value is "CollectionReference". Gets or sets the reference type property.
},
"systemData": {
"createdAt": "2020-02-20 00:00:00", # Optional. The timestamp of resource creation (UTC).
"createdBy": "str", # Optional. The identity that created the resource.
"createdByType": "str", # Optional. The type of identity that created the resource. Possible values include: "User", "Application", "ManagedIdentity", "Key".
"lastModifiedAt": "2020-02-20 00:00:00", # Optional. The timestamp of the last modification the resource (UTC).
"lastModifiedBy": "str", # Optional. The identity that last modified the resource.
"lastModifiedByType": "str" # Optional. The type of identity that last modified the resource. Possible values include: "User", "Application", "ManagedIdentity", "Key".
}
}
# response body for status code(s): 200
response.json() == {
"collectionProvisioningState": "str", # Optional. Gets the state of the provisioning. Possible values include: "Unknown", "Creating", "Moving", "Deleting", "Failed", "Succeeded".
"description": "str", # Optional. Gets or sets the description.
"friendlyName": "str", # Optional. Gets or sets the friendly name of the collection.
"name": "str", # Optional. Gets the name.
"parentCollection": {
"referenceName": "str", # Optional. Gets or sets the reference name.
"type": "CollectionReference" # Optional. Default value is "CollectionReference". Gets or sets the reference type property.
},
"systemData": {
"createdAt": "2020-02-20 00:00:00", # Optional. The timestamp of resource creation (UTC).
"createdBy": "str", # Optional. The identity that created the resource.
"createdByType": "str", # Optional. The type of identity that created the resource. Possible values include: "User", "Application", "ManagedIdentity", "Key".
"lastModifiedAt": "2020-02-20 00:00:00", # Optional. The timestamp of the last modification the resource (UTC).
"lastModifiedBy": "str", # Optional. The identity that last modified the resource.
"lastModifiedByType": "str" # Optional. The type of identity that last modified the resource. Possible values include: "User", "Application", "ManagedIdentity", "Key".
}
}
delete_collection
Deletes a Collection entity.
delete_collection(collection_name: str, **kwargs: Any) -> None
Parameters
- collection_name
- str
Returns
None
Return type
Exceptions
get_collection
Get a collection.
get_collection(collection_name: str, **kwargs: Any) -> Any
Parameters
- collection_name
- str
Returns
JSON object
Return type
Exceptions
Examples
# response body for status code(s): 200
response.json() == {
"collectionProvisioningState": "str", # Optional. Gets the state of the provisioning. Possible values include: "Unknown", "Creating", "Moving", "Deleting", "Failed", "Succeeded".
"description": "str", # Optional. Gets or sets the description.
"friendlyName": "str", # Optional. Gets or sets the friendly name of the collection.
"name": "str", # Optional. Gets the name.
"parentCollection": {
"referenceName": "str", # Optional. Gets or sets the reference name.
"type": "CollectionReference" # Optional. Default value is "CollectionReference". Gets or sets the reference type property.
},
"systemData": {
"createdAt": "2020-02-20 00:00:00", # Optional. The timestamp of resource creation (UTC).
"createdBy": "str", # Optional. The identity that created the resource.
"createdByType": "str", # Optional. The type of identity that created the resource. Possible values include: "User", "Application", "ManagedIdentity", "Key".
"lastModifiedAt": "2020-02-20 00:00:00", # Optional. The timestamp of the last modification the resource (UTC).
"lastModifiedBy": "str", # Optional. The identity that last modified the resource.
"lastModifiedByType": "str" # Optional. The type of identity that last modified the resource. Possible values include: "User", "Application", "ManagedIdentity", "Key".
}
}
get_collection_path
Gets the parent name and parent friendly name chains that represent the collection path.
get_collection_path(collection_name: str, **kwargs: Any) -> Any
Parameters
- collection_name
- str
Returns
JSON object
Return type
Exceptions
Examples
# response body for status code(s): 200
response.json() == {
"parentFriendlyNameChain": [
"str" # Optional. The friendly names of ancestors starting from the default (root) collection and ending with the immediate parent.
],
"parentNameChain": [
"str" # Optional. The names of ancestors starting from the default (root) collection and ending with the immediate parent.
]
}
list_child_collection_names
Lists the child collections names in the collection.
list_child_collection_names(collection_name: str, **kwargs: Any) -> Iterable[Any]
Parameters
- collection_name
- str
- skip_token
- str
Returns
An iterator like instance of JSON object
Return type
Exceptions
Examples
# response body for status code(s): 200
response.json() == {
"count": 0.0, # Optional. Total item count.
"nextLink": "str", # Optional. The Url of next result page.
"value": [
{
"friendlyName": "str", # Optional. Gets or sets the friendly name of the collection.
"name": "str" # Optional. Gets the name.
}
]
}
list_collections
List the collections in the account.
list_collections(**kwargs: Any) -> Iterable[Any]
Parameters
- skip_token
- str
Returns
An iterator like instance of JSON object
Return type
Exceptions
Examples
# response body for status code(s): 200
response.json() == {
"count": 0.0, # Optional. Total item count.
"nextLink": "str", # Optional. The Url of next result page.
"value": [
{
"collectionProvisioningState": "str", # Optional. Gets the state of the provisioning. Possible values include: "Unknown", "Creating", "Moving", "Deleting", "Failed", "Succeeded".
"description": "str", # Optional. Gets or sets the description.
"friendlyName": "str", # Optional. Gets or sets the friendly name of the collection.
"name": "str", # Optional. Gets the name.
"parentCollection": {
"referenceName": "str", # Optional. Gets or sets the reference name.
"type": "CollectionReference" # Optional. Default value is "CollectionReference". Gets or sets the reference type property.
},
"systemData": {
"createdAt": "2020-02-20 00:00:00", # Optional. The timestamp of resource creation (UTC).
"createdBy": "str", # Optional. The identity that created the resource.
"createdByType": "str", # Optional. The type of identity that created the resource. Possible values include: "User", "Application", "ManagedIdentity", "Key".
"lastModifiedAt": "2020-02-20 00:00:00", # Optional. The timestamp of the last modification the resource (UTC).
"lastModifiedBy": "str", # Optional. The identity that last modified the resource.
"lastModifiedByType": "str" # Optional. The type of identity that last modified the resource. Possible values include: "User", "Application", "ManagedIdentity", "Key".
}
}
]
}
Feedback
Submit and view feedback for