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.object
CollectionsOperations

Constructor

CollectionsOperations(client, config, serializer, deserializer)

Parameters

client
Required

Client for service requests.

config
Required

Configuration of service client.

serializer
Required

An object model serializer.

deserializer
Required

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
Required
collection
<xref:Any>
Required

Returns

JSON object

Return type

<xref:Any>

Exceptions

Examples


   # JSON input template you can fill out and use as your body input.
   collection = {
       "collectionProvisioningState": "str (optional)",
       "description": "str (optional)",
       "friendlyName": "str (optional)",
       "name": "str (optional)",
       "parentCollection": {
           "referenceName": "str (optional)",
           "type": "str (optional)"
       },
       "systemData": {
           "createdAt": "datetime (optional)",
           "createdBy": "str (optional)",
           "createdByType": "str (optional)",
           "lastModifiedAt": "datetime (optional)",
           "lastModifiedBy": "str (optional)",
           "lastModifiedByType": "str (optional)"
       }
   }

   # response body for status code(s): 200
   response.json() == {
       "collectionProvisioningState": "str (optional)",
       "description": "str (optional)",
       "friendlyName": "str (optional)",
       "name": "str (optional)",
       "parentCollection": {
           "referenceName": "str (optional)",
           "type": "str (optional)"
       },
       "systemData": {
           "createdAt": "datetime (optional)",
           "createdBy": "str (optional)",
           "createdByType": "str (optional)",
           "lastModifiedAt": "datetime (optional)",
           "lastModifiedBy": "str (optional)",
           "lastModifiedByType": "str (optional)"
       }
   }

delete_collection

Deletes a Collection entity.

delete_collection(collection_name: str, **kwargs: Any) -> None

Parameters

collection_name
str
Required

Returns

None

Return type

Exceptions

get_collection

Get a collection.

get_collection(collection_name: str, **kwargs: Any) -> Any

Parameters

collection_name
str
Required

Returns

JSON object

Return type

<xref:Any>

Exceptions

Examples


   # response body for status code(s): 200
   response.json() == {
       "collectionProvisioningState": "str (optional)",
       "description": "str (optional)",
       "friendlyName": "str (optional)",
       "name": "str (optional)",
       "parentCollection": {
           "referenceName": "str (optional)",
           "type": "str (optional)"
       },
       "systemData": {
           "createdAt": "datetime (optional)",
           "createdBy": "str (optional)",
           "createdByType": "str (optional)",
           "lastModifiedAt": "datetime (optional)",
           "lastModifiedBy": "str (optional)",
           "lastModifiedByType": "str (optional)"
       }
   }

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
Required

Returns

JSON object

Return type

<xref:Any>

Exceptions

Examples


   # response body for status code(s): 200
   response.json() == {
       "parentFriendlyNameChain": [
           "str (optional)"
       ],
       "parentNameChain": [
           "str (optional)"
       ]
   }

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
Required
skip_token
str

Returns

An iterator like instance of JSON object

Return type

ItemPaged[<xref:Any>]

Exceptions

Examples


   # response body for status code(s): 200
   response.json() == {
       "count": "long (optional)",
       "nextLink": "str (optional)",
       "value": [
           {
               "friendlyName": "str (optional)",
               "name": "str (optional)"
           }
       ]
   }

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

ItemPaged[<xref:Any>]

Exceptions

Examples


   # response body for status code(s): 200
   response.json() == {
       "count": "long (optional)",
       "nextLink": "str (optional)",
       "value": [
           {
               "collectionProvisioningState": "str (optional)",
               "description": "str (optional)",
               "friendlyName": "str (optional)",
               "name": "str (optional)",
               "parentCollection": {
                   "referenceName": "str (optional)",
                   "type": "str (optional)"
               },
               "systemData": {
                   "createdAt": "datetime (optional)",
                   "createdBy": "str (optional)",
                   "createdByType": "str (optional)",
                   "lastModifiedAt": "datetime (optional)",
                   "lastModifiedBy": "str (optional)",
                   "lastModifiedByType": "str (optional)"
               }
           }
       ]
   }