azure.purview.sharing.operations package

class azure.purview.sharing.operations.ReceivedSharesOperations(*args, **kwargs)[source]

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through PurviewSharingClient’s received_shares attribute.

activate_tenant_email_registration(tenant_email_registration: JSON, *, repeatability_request_id: Optional[str] = 'None', content_type: str = "'application/json'", **kwargs: Any)JSON[source]
activate_tenant_email_registration(tenant_email_registration: IO, *, repeatability_request_id: Optional[str] = 'None', content_type: str = "'application/json'", **kwargs: Any)JSON

Activates the tenant and email combination using the activation code received.

Activates the email registration for current tenant.

Parameters

tenant_email_registration (JSON or IO) – The tenant email registration payload. Is either a JSON type or a IO type. Required.

Keyword Arguments
  • repeatability_request_id (str) – If specified, the client directs that the request is repeatable; that is, that the client can make the request multiple times with the same Repeatability-Request-Id and get back an appropriate response without the server executing the request multiple times. The value of the Repeatability-Request-Id is an opaque string representing a client-generated, globally unique for all time, identifier for the request. It is recommended to use version 4 (random) UUIDs. Default value is None.

  • content_type (str) – Body Parameter content-type. Known values are: ‘application/json’. Default value is None.

Returns

JSON object

Return type

JSON

Raises

HttpResponseError

Example

# JSON input template you can fill out and use as your body input.
tenant_email_registration = {
    "id": "str",  # Optional. The unique id of the resource.
    "properties": {
        "activationCode": "str",  # Activation code for the registration.
          Required.
        "activationExpiration": "2020-02-20 00:00:00",  # Optional. Date of
          the activation expiration. Represented in the standard date-time format as
          defined by `RFC 3339 <https://www.rfc-editor.org/rfc/rfc3339>`_.
        "email": "str",  # Optional. The email to register.
        "registrationStatus": "str",  # Optional. Defines the supported types
          for registration. Known values are: "ActivationPending", "Activated", and
          "ActivationAttemptsExhausted".
        "state": "str",  # Optional. State of the resource. Known values are:
          "Unknown", "Succeeded", "Creating", "Deleting", "Moving", and "Failed".
        "tenantId": "str"  # Optional. The tenant id to register.
    },
    "type": "str"  # Optional. Type of the resource.
}

# response body for status code(s): 200
response == {
    "id": "str",  # Optional. The unique id of the resource.
    "properties": {
        "activationCode": "str",  # Activation code for the registration.
          Required.
        "activationExpiration": "2020-02-20 00:00:00",  # Optional. Date of
          the activation expiration. Represented in the standard date-time format as
          defined by `RFC 3339 <https://www.rfc-editor.org/rfc/rfc3339>`_.
        "email": "str",  # Optional. The email to register.
        "registrationStatus": "str",  # Optional. Defines the supported types
          for registration. Known values are: "ActivationPending", "Activated", and
          "ActivationAttemptsExhausted".
        "state": "str",  # Optional. State of the resource. Known values are:
          "Unknown", "Succeeded", "Creating", "Deleting", "Moving", and "Failed".
        "tenantId": "str"  # Optional. The tenant id to register.
    },
    "type": "str"  # Optional. Type of the resource.
}
begin_create_or_replace(received_share_id: str, received_share: JSON, *, content_type: str = "'application/json'", **kwargs: Any)LROPoller[JSON][source]
begin_create_or_replace(received_share_id: str, received_share: IO, *, content_type: str = "'application/json'", **kwargs: Any)LROPoller[JSON]

Create or replace a received share.

Update changes to a received share.

Parameters
  • received_share_id (str) – Id of the received share. Required.

  • received_share (JSON or IO) – The received share to create or replace. Is either a JSON type or a IO type. Required.

Keyword Arguments
  • content_type (str) – Body Parameter content-type. Known values are: ‘application/json’. Default value is None.

  • continuation_token (str) – A continuation token to restart a poller from a saved state.

  • polling (bool or PollingMethod) – By default, your polling method will be LROBasePolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

  • polling_interval (int) – Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

An instance of LROPoller that returns JSON object

Return type

LROPoller[JSON]

Raises

HttpResponseError

Example

# The input is polymorphic. The following are possible polymorphic inputs based off
  discriminator "shareKind":

# JSON input template for discriminator value "InPlace":
received_share = {
    "properties": {
        "assetLocation": "str",  # Optional. Location of the shared Asset.
        "assetStoreKind": "str",  # Optional. The types of asset. Known
          values are: "AdlsGen2Account" and "BlobAccount".
        "createdAt": "2020-02-20 00:00:00",  # Optional. Time at which the
          received share was created. Represented in the standard date-time format as
          defined by `RFC 3339 <https://www.rfc-editor.org/rfc/rfc3339>`_.
        "displayName": "str",  # Optional. Received Share Name.
        "expirationDate": "2020-02-20 00:00:00",  # Optional. The expiration
          date of the received share. Represented in the standard date-time format as
          defined by `RFC 3339 <https://www.rfc-editor.org/rfc/rfc3339>`_.
        "receiverEmail": "str",  # Optional. Email of the user/receiver who
          received the sent share invitation.
        "receiverName": "str",  # Optional. Name of the user/receiver who
          received the sent share invitation.
        "receiverTenantName": "str",  # Optional. Tenant name of the
          user/receiver who received the sent share invitation.
        "senderEmail": "str",  # Optional. Email of the sender who created
          the sent share invitation.
        "senderName": "str",  # Optional. Name of the sender who created the
          sent share invitation.
        "senderTenantName": "str",  # Optional. Tenant name of the sender who
          created the sent share invitation.
        "sentShareDescription": "str",  # Optional. Share description.
        "shareStatus": "str",  # Optional. Share status. Known values are:
          "Detached" and "Attached".
        "sharedAt": "2020-02-20 00:00:00",  # Optional. Time at which the
          sent share was shared. Represented in the standard date-time format as
          defined by `RFC 3339 <https://www.rfc-editor.org/rfc/rfc3339>`_.
        "sink": sink,
        "state": "str"  # Optional. State of the resource. Known values are:
          "Unknown", "Succeeded", "Creating", "Deleting", "Moving", and "Failed".
    },
    "shareKind": "InPlace",
    "id": "str",  # Optional. The unique id of the resource.
    "type": "str"  # Optional. Type of the resource.
}

# JSON input template for discriminator value "AdlsGen2Account":
sink = {
    "properties": {
        "containerName": "str",  # Adls Gen 2 Container Name. Required.
        "folder": "str",  # Adls Gen 2 Folder. Required.
        "location": "str",  # Optional. Adls Gen 2 Location.
        "mountPath": "str"  # Optional. Adls Gen 2 Mount Path.
    },
    "storeKind": "AdlsGen2Account",
    "storeReference": {
        "referenceName": "str",  # Optional. Reference name for resource
          associated with the sink or artifact.
        "type": "str"  # Optional. Defines the type of resource being shared.
          "ArmResourceReference"
    }
}

# JSON input template for discriminator value "BlobAccount":
sink = {
    "properties": {
        "containerName": "str",  # Blob Container Name. Required.
        "folder": "str",  # Blob Folder. Required.
        "location": "str",  # Optional. Blob Location.
        "mountPath": "str"  # Optional. Blob Mount Path.
    },
    "storeKind": "BlobAccount",
    "storeReference": {
        "referenceName": "str",  # Optional. Reference name for resource
          associated with the sink or artifact.
        "type": "str"  # Optional. Defines the type of resource being shared.
          "ArmResourceReference"
    }
}

# JSON input template you can fill out and use as your body input.
received_share = received_share
# The response is polymorphic. The following are possible polymorphic responses based
  off discriminator "shareKind":

# JSON input template for discriminator value "InPlace":
received_share = {
    "properties": {
        "assetLocation": "str",  # Optional. Location of the shared Asset.
        "assetStoreKind": "str",  # Optional. The types of asset. Known
          values are: "AdlsGen2Account" and "BlobAccount".
        "createdAt": "2020-02-20 00:00:00",  # Optional. Time at which the
          received share was created. Represented in the standard date-time format as
          defined by `RFC 3339 <https://www.rfc-editor.org/rfc/rfc3339>`_.
        "displayName": "str",  # Optional. Received Share Name.
        "expirationDate": "2020-02-20 00:00:00",  # Optional. The expiration
          date of the received share. Represented in the standard date-time format as
          defined by `RFC 3339 <https://www.rfc-editor.org/rfc/rfc3339>`_.
        "receiverEmail": "str",  # Optional. Email of the user/receiver who
          received the sent share invitation.
        "receiverName": "str",  # Optional. Name of the user/receiver who
          received the sent share invitation.
        "receiverTenantName": "str",  # Optional. Tenant name of the
          user/receiver who received the sent share invitation.
        "senderEmail": "str",  # Optional. Email of the sender who created
          the sent share invitation.
        "senderName": "str",  # Optional. Name of the sender who created the
          sent share invitation.
        "senderTenantName": "str",  # Optional. Tenant name of the sender who
          created the sent share invitation.
        "sentShareDescription": "str",  # Optional. Share description.
        "shareStatus": "str",  # Optional. Share status. Known values are:
          "Detached" and "Attached".
        "sharedAt": "2020-02-20 00:00:00",  # Optional. Time at which the
          sent share was shared. Represented in the standard date-time format as
          defined by `RFC 3339 <https://www.rfc-editor.org/rfc/rfc3339>`_.
        "sink": sink,
        "state": "str"  # Optional. State of the resource. Known values are:
          "Unknown", "Succeeded", "Creating", "Deleting", "Moving", and "Failed".
    },
    "shareKind": "InPlace",
    "id": "str",  # Optional. The unique id of the resource.
    "type": "str"  # Optional. Type of the resource.
}

# JSON input template for discriminator value "AdlsGen2Account":
sink = {
    "properties": {
        "containerName": "str",  # Adls Gen 2 Container Name. Required.
        "folder": "str",  # Adls Gen 2 Folder. Required.
        "location": "str",  # Optional. Adls Gen 2 Location.
        "mountPath": "str"  # Optional. Adls Gen 2 Mount Path.
    },
    "storeKind": "AdlsGen2Account",
    "storeReference": {
        "referenceName": "str",  # Optional. Reference name for resource
          associated with the sink or artifact.
        "type": "str"  # Optional. Defines the type of resource being shared.
          "ArmResourceReference"
    }
}

# JSON input template for discriminator value "BlobAccount":
sink = {
    "properties": {
        "containerName": "str",  # Blob Container Name. Required.
        "folder": "str",  # Blob Folder. Required.
        "location": "str",  # Optional. Blob Location.
        "mountPath": "str"  # Optional. Blob Mount Path.
    },
    "storeKind": "BlobAccount",
    "storeReference": {
        "referenceName": "str",  # Optional. Reference name for resource
          associated with the sink or artifact.
        "type": "str"  # Optional. Defines the type of resource being shared.
          "ArmResourceReference"
    }
}
# The response is polymorphic. The following are possible polymorphic responses based
  off discriminator "shareKind":

# JSON input template for discriminator value "InPlace":
received_share = {
    "properties": {
        "assetLocation": "str",  # Optional. Location of the shared Asset.
        "assetStoreKind": "str",  # Optional. The types of asset. Known
          values are: "AdlsGen2Account" and "BlobAccount".
        "createdAt": "2020-02-20 00:00:00",  # Optional. Time at which the
          received share was created. Represented in the standard date-time format as
          defined by `RFC 3339 <https://www.rfc-editor.org/rfc/rfc3339>`_.
        "displayName": "str",  # Optional. Received Share Name.
        "expirationDate": "2020-02-20 00:00:00",  # Optional. The expiration
          date of the received share. Represented in the standard date-time format as
          defined by `RFC 3339 <https://www.rfc-editor.org/rfc/rfc3339>`_.
        "receiverEmail": "str",  # Optional. Email of the user/receiver who
          received the sent share invitation.
        "receiverName": "str",  # Optional. Name of the user/receiver who
          received the sent share invitation.
        "receiverTenantName": "str",  # Optional. Tenant name of the
          user/receiver who received the sent share invitation.
        "senderEmail": "str",  # Optional. Email of the sender who created
          the sent share invitation.
        "senderName": "str",  # Optional. Name of the sender who created the
          sent share invitation.
        "senderTenantName": "str",  # Optional. Tenant name of the sender who
          created the sent share invitation.
        "sentShareDescription": "str",  # Optional. Share description.
        "shareStatus": "str",  # Optional. Share status. Known values are:
          "Detached" and "Attached".
        "sharedAt": "2020-02-20 00:00:00",  # Optional. Time at which the
          sent share was shared. Represented in the standard date-time format as
          defined by `RFC 3339 <https://www.rfc-editor.org/rfc/rfc3339>`_.
        "sink": sink,
        "state": "str"  # Optional. State of the resource. Known values are:
          "Unknown", "Succeeded", "Creating", "Deleting", "Moving", and "Failed".
    },
    "shareKind": "InPlace",
    "id": "str",  # Optional. The unique id of the resource.
    "type": "str"  # Optional. Type of the resource.
}

# JSON input template for discriminator value "AdlsGen2Account":
sink = {
    "properties": {
        "containerName": "str",  # Adls Gen 2 Container Name. Required.
        "folder": "str",  # Adls Gen 2 Folder. Required.
        "location": "str",  # Optional. Adls Gen 2 Location.
        "mountPath": "str"  # Optional. Adls Gen 2 Mount Path.
    },
    "storeKind": "AdlsGen2Account",
    "storeReference": {
        "referenceName": "str",  # Optional. Reference name for resource
          associated with the sink or artifact.
        "type": "str"  # Optional. Defines the type of resource being shared.
          "ArmResourceReference"
    }
}

# JSON input template for discriminator value "BlobAccount":
sink = {
    "properties": {
        "containerName": "str",  # Blob Container Name. Required.
        "folder": "str",  # Blob Folder. Required.
        "location": "str",  # Optional. Blob Location.
        "mountPath": "str"  # Optional. Blob Mount Path.
    },
    "storeKind": "BlobAccount",
    "storeReference": {
        "referenceName": "str",  # Optional. Reference name for resource
          associated with the sink or artifact.
        "type": "str"  # Optional. Defines the type of resource being shared.
          "ArmResourceReference"
    }
}

# response body for status code(s): 200, 201
response == received_share
begin_delete(received_share_id: str, **kwargs: Any)azure.core.polling._poller.LROPoller[collections.abc.MutableMapping[str, Any]][source]

Deletes a received share.

Delete a received share.

Parameters

received_share_id (str) – Id of the received share. Required.

Keyword Arguments
  • continuation_token (str) – A continuation token to restart a poller from a saved state.

  • polling (bool or PollingMethod) – By default, your polling method will be LROBasePolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

  • polling_interval (int) – Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

An instance of LROPoller that returns JSON object

Return type

LROPoller[JSON]

Raises

HttpResponseError

Example

# response body for status code(s): 202
response == {
    "status": "str",  # States for long running operations. Required. Known
      values are: "Running", "TransientFailure", "Succeeded", "Failed", and
      "NotStarted".
    "endTime": "2020-02-20 00:00:00",  # Optional. End time of the long running
      operation. Represented in the standard date-time format as defined by `RFC 3339
      <https://www.rfc-editor.org/rfc/rfc3339>`_.
    "error": {
        "code": "str",  # Code of the error. Required.
        "message": "str",  # Message of the error. Required.
        "details": [
            ...
        ],
        "target": "str"  # Optional. Target of the error.
    },
    "id": "str",  # Optional. Job id of the long running operation.
    "startTime": "2020-02-20 00:00:00"  # Optional. Start time of the long
      running operation. Represented in the standard date-time format as defined by
      `RFC 3339 <https://www.rfc-editor.org/rfc/rfc3339>`_.
}
get(received_share_id: str, **kwargs: Any)collections.abc.MutableMapping[str, Any][source]

Get a received share by unique id.

Get a received share.

Parameters

received_share_id (str) – Id of the received share. Required.

Returns

JSON object

Return type

JSON

Raises

HttpResponseError

Example

list_attached(*, reference_name: str, filter: Optional[str] = None, order_by: Optional[str] = None, **kwargs: Any)Iterable[collections.abc.MutableMapping[str, Any]][source]

Get a list of attached received shares.

List attached received shares.

Keyword Arguments
  • reference_name (str) – A name that references a data store. Required.

  • filter (str) – Filters the results using OData syntax. Default value is None.

  • order_by (str) – Sorts the results using OData syntax. Default value is None.

Returns

An iterator like instance of JSON object

Return type

ItemPaged[JSON]

Raises

HttpResponseError

Example

list_detached(*, filter: Optional[str] = None, order_by: Optional[str] = None, **kwargs: Any)Iterable[collections.abc.MutableMapping[str, Any]][source]

Get a list of detached received shares.

List detached received shares.

Keyword Arguments
  • filter (str) – Filters the results using OData syntax. Default value is None.

  • order_by (str) – Sorts the results using OData syntax. Default value is None.

Returns

An iterator like instance of JSON object

Return type

ItemPaged[JSON]

Raises

HttpResponseError

Example

register_tenant_email_registration(*, repeatability_request_id: Optional[str] = None, **kwargs: Any)collections.abc.MutableMapping[str, Any][source]

Registers the tenant and email combination for activation.

Register an email for the current tenant.

Keyword Arguments

repeatability_request_id (str) – If specified, the client directs that the request is repeatable; that is, that the client can make the request multiple times with the same Repeatability-Request-Id and get back an appropriate response without the server executing the request multiple times. The value of the Repeatability-Request-Id is an opaque string representing a client-generated, globally unique for all time, identifier for the request. It is recommended to use version 4 (random) UUIDs. Default value is None.

Returns

JSON object

Return type

JSON

Raises

HttpResponseError

Example

# response body for status code(s): 200
response == {
    "id": "str",  # Optional. The unique id of the resource.
    "properties": {
        "activationCode": "str",  # Activation code for the registration.
          Required.
        "activationExpiration": "2020-02-20 00:00:00",  # Optional. Date of
          the activation expiration. Represented in the standard date-time format as
          defined by `RFC 3339 <https://www.rfc-editor.org/rfc/rfc3339>`_.
        "email": "str",  # Optional. The email to register.
        "registrationStatus": "str",  # Optional. Defines the supported types
          for registration. Known values are: "ActivationPending", "Activated", and
          "ActivationAttemptsExhausted".
        "state": "str",  # Optional. State of the resource. Known values are:
          "Unknown", "Succeeded", "Creating", "Deleting", "Moving", and "Failed".
        "tenantId": "str"  # Optional. The tenant id to register.
    },
    "type": "str"  # Optional. Type of the resource.
}
class azure.purview.sharing.operations.SentSharesOperations(*args, **kwargs)[source]

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through PurviewSharingClient’s sent_shares attribute.

begin_create_or_replace(sent_share_id: str, sent_share: JSON, *, content_type: str = "'application/json'", **kwargs: Any)LROPoller[JSON][source]
begin_create_or_replace(sent_share_id: str, sent_share: IO, *, content_type: str = "'application/json'", **kwargs: Any)LROPoller[JSON]

Create or replace a sent share.

Create or replace a sent share.

Parameters
  • sent_share_id (str) – Id of the sent share. Required.

  • sent_share (JSON or IO) – The sent share to create or replace. Is either a JSON type or a IO type. Required.

Keyword Arguments
  • content_type (str) – Body Parameter content-type. Known values are: ‘application/json’. Default value is None.

  • continuation_token (str) – A continuation token to restart a poller from a saved state.

  • polling (bool or PollingMethod) – By default, your polling method will be LROBasePolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

  • polling_interval (int) – Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

An instance of LROPoller that returns JSON object

Return type

LROPoller[JSON]

Raises

HttpResponseError

Example

# The input is polymorphic. The following are possible polymorphic inputs based off
  discriminator "shareKind":

# JSON input template for discriminator value "InPlace":
sent_share = {
    "properties": {
        "artifact": artifact,
        "displayName": "str",  # The name of the sent share. Required.
        "createdAt": "2020-02-20 00:00:00",  # Optional. Time at which the
          sent share was created. Represented in the standard date-time format as
          defined by `RFC 3339 <https://www.rfc-editor.org/rfc/rfc3339>`_.
        "dependsOn": [
            "str"  # Optional. List of shares on which the sent share
              depends.
        ],
        "description": "str",  # Optional. Sent share description.
        "senderEmail": "str",  # Optional. Email of the sender who created
          the sent share.
        "senderName": "str",  # Optional. Name of the sender who created the
          sent share.
        "senderTenantName": "str",  # Optional. Tenant name of the sender who
          created the sent share.
        "state": "str"  # Optional. State of the resource. Known values are:
          "Unknown", "Succeeded", "Creating", "Deleting", "Moving", and "Failed".
    },
    "shareKind": "InPlace",
    "id": "str",  # Optional. The unique id of the resource.
    "type": "str"  # Optional. Type of the resource.
}

# JSON input template for discriminator value "AdlsGen2Account":
artifact = {
    "properties": {
        "paths": [
            {
                "containerName": "str",  # Gets or sets the container
                  name. Required.
                "receiverPath": "str",  # Optional. Gets or sets the
                  path on the receiver side where the artifact is to be mapped.
                "senderPath": "str"  # Optional. Gets or sets the
                  path to file/folder within the container to be shared.
            }
        ],
        "location": "str"  # Optional. Location of the storage account.
    },
    "storeKind": "AdlsGen2Account",
    "storeReference": {
        "referenceName": "str",  # Optional. Reference name for resource
          associated with the sink or artifact.
        "type": "str"  # Optional. Defines the type of resource being shared.
          "ArmResourceReference"
    }
}

# JSON input template for discriminator value "BlobAccount":
artifact = {
    "properties": {
        "paths": [
            {
                "containerName": "str",  # Gets or sets the container
                  name. Required.
                "receiverPath": "str",  # Optional. Gets or sets the
                  path on the receiver side where the artifact is to be mapped.
                "senderPath": "str"  # Optional. Gets or sets the
                  path to file/folder within the container to be shared.
            }
        ],
        "location": "str"  # Optional. Location of the storage account.
    },
    "storeKind": "BlobAccount",
    "storeReference": {
        "referenceName": "str",  # Optional. Reference name for resource
          associated with the sink or artifact.
        "type": "str"  # Optional. Defines the type of resource being shared.
          "ArmResourceReference"
    }
}

# JSON input template you can fill out and use as your body input.
sent_share = sent_share
# The response is polymorphic. The following are possible polymorphic responses based
  off discriminator "shareKind":

# JSON input template for discriminator value "InPlace":
sent_share = {
    "properties": {
        "artifact": artifact,
        "displayName": "str",  # The name of the sent share. Required.
        "createdAt": "2020-02-20 00:00:00",  # Optional. Time at which the
          sent share was created. Represented in the standard date-time format as
          defined by `RFC 3339 <https://www.rfc-editor.org/rfc/rfc3339>`_.
        "dependsOn": [
            "str"  # Optional. List of shares on which the sent share
              depends.
        ],
        "description": "str",  # Optional. Sent share description.
        "senderEmail": "str",  # Optional. Email of the sender who created
          the sent share.
        "senderName": "str",  # Optional. Name of the sender who created the
          sent share.
        "senderTenantName": "str",  # Optional. Tenant name of the sender who
          created the sent share.
        "state": "str"  # Optional. State of the resource. Known values are:
          "Unknown", "Succeeded", "Creating", "Deleting", "Moving", and "Failed".
    },
    "shareKind": "InPlace",
    "id": "str",  # Optional. The unique id of the resource.
    "type": "str"  # Optional. Type of the resource.
}

# JSON input template for discriminator value "AdlsGen2Account":
artifact = {
    "properties": {
        "paths": [
            {
                "containerName": "str",  # Gets or sets the container
                  name. Required.
                "receiverPath": "str",  # Optional. Gets or sets the
                  path on the receiver side where the artifact is to be mapped.
                "senderPath": "str"  # Optional. Gets or sets the
                  path to file/folder within the container to be shared.
            }
        ],
        "location": "str"  # Optional. Location of the storage account.
    },
    "storeKind": "AdlsGen2Account",
    "storeReference": {
        "referenceName": "str",  # Optional. Reference name for resource
          associated with the sink or artifact.
        "type": "str"  # Optional. Defines the type of resource being shared.
          "ArmResourceReference"
    }
}

# JSON input template for discriminator value "BlobAccount":
artifact = {
    "properties": {
        "paths": [
            {
                "containerName": "str",  # Gets or sets the container
                  name. Required.
                "receiverPath": "str",  # Optional. Gets or sets the
                  path on the receiver side where the artifact is to be mapped.
                "senderPath": "str"  # Optional. Gets or sets the
                  path to file/folder within the container to be shared.
            }
        ],
        "location": "str"  # Optional. Location of the storage account.
    },
    "storeKind": "BlobAccount",
    "storeReference": {
        "referenceName": "str",  # Optional. Reference name for resource
          associated with the sink or artifact.
        "type": "str"  # Optional. Defines the type of resource being shared.
          "ArmResourceReference"
    }
}
# The response is polymorphic. The following are possible polymorphic responses based
  off discriminator "shareKind":

# JSON input template for discriminator value "InPlace":
sent_share = {
    "properties": {
        "artifact": artifact,
        "displayName": "str",  # The name of the sent share. Required.
        "createdAt": "2020-02-20 00:00:00",  # Optional. Time at which the
          sent share was created. Represented in the standard date-time format as
          defined by `RFC 3339 <https://www.rfc-editor.org/rfc/rfc3339>`_.
        "dependsOn": [
            "str"  # Optional. List of shares on which the sent share
              depends.
        ],
        "description": "str",  # Optional. Sent share description.
        "senderEmail": "str",  # Optional. Email of the sender who created
          the sent share.
        "senderName": "str",  # Optional. Name of the sender who created the
          sent share.
        "senderTenantName": "str",  # Optional. Tenant name of the sender who
          created the sent share.
        "state": "str"  # Optional. State of the resource. Known values are:
          "Unknown", "Succeeded", "Creating", "Deleting", "Moving", and "Failed".
    },
    "shareKind": "InPlace",
    "id": "str",  # Optional. The unique id of the resource.
    "type": "str"  # Optional. Type of the resource.
}

# JSON input template for discriminator value "AdlsGen2Account":
artifact = {
    "properties": {
        "paths": [
            {
                "containerName": "str",  # Gets or sets the container
                  name. Required.
                "receiverPath": "str",  # Optional. Gets or sets the
                  path on the receiver side where the artifact is to be mapped.
                "senderPath": "str"  # Optional. Gets or sets the
                  path to file/folder within the container to be shared.
            }
        ],
        "location": "str"  # Optional. Location of the storage account.
    },
    "storeKind": "AdlsGen2Account",
    "storeReference": {
        "referenceName": "str",  # Optional. Reference name for resource
          associated with the sink or artifact.
        "type": "str"  # Optional. Defines the type of resource being shared.
          "ArmResourceReference"
    }
}

# JSON input template for discriminator value "BlobAccount":
artifact = {
    "properties": {
        "paths": [
            {
                "containerName": "str",  # Gets or sets the container
                  name. Required.
                "receiverPath": "str",  # Optional. Gets or sets the
                  path on the receiver side where the artifact is to be mapped.
                "senderPath": "str"  # Optional. Gets or sets the
                  path to file/folder within the container to be shared.
            }
        ],
        "location": "str"  # Optional. Location of the storage account.
    },
    "storeKind": "BlobAccount",
    "storeReference": {
        "referenceName": "str",  # Optional. Reference name for resource
          associated with the sink or artifact.
        "type": "str"  # Optional. Defines the type of resource being shared.
          "ArmResourceReference"
    }
}

# response body for status code(s): 200, 201
response == sent_share
begin_delete(sent_share_id: str, **kwargs: Any)azure.core.polling._poller.LROPoller[collections.abc.MutableMapping[str, Any]][source]

Deletes a sent share.

Delete a sent share.

Parameters

sent_share_id (str) – Id of the sent share. Required.

Keyword Arguments
  • continuation_token (str) – A continuation token to restart a poller from a saved state.

  • polling (bool or PollingMethod) – By default, your polling method will be LROBasePolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

  • polling_interval (int) – Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

An instance of LROPoller that returns JSON object

Return type

LROPoller[JSON]

Raises

HttpResponseError

Example

# response body for status code(s): 202
response == {
    "status": "str",  # States for long running operations. Required. Known
      values are: "Running", "TransientFailure", "Succeeded", "Failed", and
      "NotStarted".
    "endTime": "2020-02-20 00:00:00",  # Optional. End time of the long running
      operation. Represented in the standard date-time format as defined by `RFC 3339
      <https://www.rfc-editor.org/rfc/rfc3339>`_.
    "error": {
        "code": "str",  # Code of the error. Required.
        "message": "str",  # Message of the error. Required.
        "details": [
            ...
        ],
        "target": "str"  # Optional. Target of the error.
    },
    "id": "str",  # Optional. Job id of the long running operation.
    "startTime": "2020-02-20 00:00:00"  # Optional. Start time of the long
      running operation. Represented in the standard date-time format as defined by
      `RFC 3339 <https://www.rfc-editor.org/rfc/rfc3339>`_.
}
begin_delete_invitation(sent_share_id: str, sent_share_invitation_id: str, **kwargs: Any)azure.core.polling._poller.LROPoller[collections.abc.MutableMapping[str, Any]][source]

Delete Invitation in a share.

Delete a sent share invitation.

Parameters
  • sent_share_id (str) – Id of the sent share. Required.

  • sent_share_invitation_id (str) – Id of the sent share invitation. Required.

Keyword Arguments
  • continuation_token (str) – A continuation token to restart a poller from a saved state.

  • polling (bool or PollingMethod) – By default, your polling method will be LROBasePolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

  • polling_interval (int) – Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

An instance of LROPoller that returns JSON object

Return type

LROPoller[JSON]

Raises

HttpResponseError

Example

# response body for status code(s): 202
response == {
    "status": "str",  # States for long running operations. Required. Known
      values are: "Running", "TransientFailure", "Succeeded", "Failed", and
      "NotStarted".
    "endTime": "2020-02-20 00:00:00",  # Optional. End time of the long running
      operation. Represented in the standard date-time format as defined by `RFC 3339
      <https://www.rfc-editor.org/rfc/rfc3339>`_.
    "error": {
        "code": "str",  # Code of the error. Required.
        "message": "str",  # Message of the error. Required.
        "details": [
            ...
        ],
        "target": "str"  # Optional. Target of the error.
    },
    "id": "str",  # Optional. Job id of the long running operation.
    "startTime": "2020-02-20 00:00:00"  # Optional. Start time of the long
      running operation. Represented in the standard date-time format as defined by
      `RFC 3339 <https://www.rfc-editor.org/rfc/rfc3339>`_.
}
create_invitation(sent_share_id: str, sent_share_invitation_id: str, sent_share_invitation: JSON, *, content_type: str = "'application/json'", **kwargs: Any)JSON[source]
create_invitation(sent_share_id: str, sent_share_invitation_id: str, sent_share_invitation: IO, *, content_type: str = "'application/json'", **kwargs: Any)JSON

Create a sent share invitation.

Create a recipient for a given sent share.

Parameters
  • sent_share_id (str) – Id of the sent share. Required.

  • sent_share_invitation_id (str) – Id of the sent share invitation. Required.

  • sent_share_invitation (JSON or IO) – The sent share invitation to create. Is either a JSON type or a IO type. Required.

Keyword Arguments

content_type (str) – Body Parameter content-type. Known values are: ‘application/json’. Default value is None.

Returns

JSON object

Return type

JSON

Raises

HttpResponseError

Example

# The input is polymorphic. The following are possible polymorphic inputs based off
  discriminator "invitationKind":

# JSON input template for discriminator value "Service":
sent_share_invitation = {
    "invitationKind": "Service",
    "properties": {
        "targetActiveDirectoryId": "str",  # The target azure active
          directory id the invitation is sent to. Required.
        "targetObjectId": "str",  # The target object id in the azure active
          directory the invitation is sent to. Required.
        "expirationDate": "2020-02-20 00:00:00",  # Optional. The time at
          which the invitation will expire. Represented in the standard date-time
          format as defined by `RFC 3339 <https://www.rfc-editor.org/rfc/rfc3339>`_.
        "senderEmail": "str",  # Optional. Email address of the sender.
        "senderName": "str",  # Optional. Name of the sender.
        "senderTenantName": "str",  # Optional. Tenant name of the sender.
        "sentAt": "2020-02-20 00:00:00",  # Optional. Gets the time at which
          the invitation was sent. Represented in the standard date-time format as
          defined by `RFC 3339 <https://www.rfc-editor.org/rfc/rfc3339>`_.
        "shareStatus": "str",  # Optional. Share status. Known values are:
          "Detached" and "Attached".
        "state": "str"  # Optional. State of the resource. Known values are:
          "Unknown", "Succeeded", "Creating", "Deleting", "Moving", and "Failed".
    },
    "id": "str",  # Optional. The unique id of the resource.
    "type": "str"  # Optional. Type of the resource.
}

# JSON input template for discriminator value "User":
sent_share_invitation = {
    "invitationKind": "User",
    "properties": {
        "targetEmail": "str",  # The receiver email for the invitation is
          being sent. Required.
        "expirationDate": "2020-02-20 00:00:00",  # Optional. The time at
          which the invitation will expire. Represented in the standard date-time
          format as defined by `RFC 3339 <https://www.rfc-editor.org/rfc/rfc3339>`_.
        "notify": bool,  # Optional. Whether or not the recipient was
          notified via email.
        "senderEmail": "str",  # Optional. Email address of the sender.
        "senderName": "str",  # Optional. Name of the sender.
        "senderTenantName": "str",  # Optional. Tenant name of the sender.
        "sentAt": "2020-02-20 00:00:00",  # Optional. Gets the time at which
          the invitation was sent. Represented in the standard date-time format as
          defined by `RFC 3339 <https://www.rfc-editor.org/rfc/rfc3339>`_.
        "shareStatus": "str",  # Optional. Share status. Known values are:
          "Detached" and "Attached".
        "state": "str"  # Optional. State of the resource. Known values are:
          "Unknown", "Succeeded", "Creating", "Deleting", "Moving", and "Failed".
    },
    "id": "str",  # Optional. The unique id of the resource.
    "type": "str"  # Optional. Type of the resource.
}

# JSON input template you can fill out and use as your body input.
sent_share_invitation = sent_share_invitation
# The response is polymorphic. The following are possible polymorphic responses based
  off discriminator "invitationKind":

# JSON input template for discriminator value "Service":
sent_share_invitation = {
    "invitationKind": "Service",
    "properties": {
        "targetActiveDirectoryId": "str",  # The target azure active
          directory id the invitation is sent to. Required.
        "targetObjectId": "str",  # The target object id in the azure active
          directory the invitation is sent to. Required.
        "expirationDate": "2020-02-20 00:00:00",  # Optional. The time at
          which the invitation will expire. Represented in the standard date-time
          format as defined by `RFC 3339 <https://www.rfc-editor.org/rfc/rfc3339>`_.
        "senderEmail": "str",  # Optional. Email address of the sender.
        "senderName": "str",  # Optional. Name of the sender.
        "senderTenantName": "str",  # Optional. Tenant name of the sender.
        "sentAt": "2020-02-20 00:00:00",  # Optional. Gets the time at which
          the invitation was sent. Represented in the standard date-time format as
          defined by `RFC 3339 <https://www.rfc-editor.org/rfc/rfc3339>`_.
        "shareStatus": "str",  # Optional. Share status. Known values are:
          "Detached" and "Attached".
        "state": "str"  # Optional. State of the resource. Known values are:
          "Unknown", "Succeeded", "Creating", "Deleting", "Moving", and "Failed".
    },
    "id": "str",  # Optional. The unique id of the resource.
    "type": "str"  # Optional. Type of the resource.
}

# JSON input template for discriminator value "User":
sent_share_invitation = {
    "invitationKind": "User",
    "properties": {
        "targetEmail": "str",  # The receiver email for the invitation is
          being sent. Required.
        "expirationDate": "2020-02-20 00:00:00",  # Optional. The time at
          which the invitation will expire. Represented in the standard date-time
          format as defined by `RFC 3339 <https://www.rfc-editor.org/rfc/rfc3339>`_.
        "notify": bool,  # Optional. Whether or not the recipient was
          notified via email.
        "senderEmail": "str",  # Optional. Email address of the sender.
        "senderName": "str",  # Optional. Name of the sender.
        "senderTenantName": "str",  # Optional. Tenant name of the sender.
        "sentAt": "2020-02-20 00:00:00",  # Optional. Gets the time at which
          the invitation was sent. Represented in the standard date-time format as
          defined by `RFC 3339 <https://www.rfc-editor.org/rfc/rfc3339>`_.
        "shareStatus": "str",  # Optional. Share status. Known values are:
          "Detached" and "Attached".
        "state": "str"  # Optional. State of the resource. Known values are:
          "Unknown", "Succeeded", "Creating", "Deleting", "Moving", and "Failed".
    },
    "id": "str",  # Optional. The unique id of the resource.
    "type": "str"  # Optional. Type of the resource.
}

# response body for status code(s): 201
response == sent_share_invitation
get(sent_share_id: str, **kwargs: Any)collections.abc.MutableMapping[str, Any][source]

Get a sent share by guid.

Get a sent share.

Parameters

sent_share_id (str) – Id of the sent share. Required.

Returns

JSON object

Return type

JSON

Raises

HttpResponseError

Example

get_invitation(sent_share_id: str, sent_share_invitation_id: str, **kwargs: Any)collections.abc.MutableMapping[str, Any][source]

Get sent share invitation for a given sent share.

Get recipient for a given sent share.

Parameters
  • sent_share_id (str) – Id of the sent share. Required.

  • sent_share_invitation_id (str) – Id of the sent share invitation. Required.

Returns

JSON object

Return type

JSON

Raises

HttpResponseError

Example

list(*, reference_name: str, filter: Optional[str] = None, order_by: Optional[str] = None, **kwargs: Any)Iterable[collections.abc.MutableMapping[str, Any]][source]

Get a list of sent shares.

List sent shares.

Keyword Arguments
  • reference_name (str) – A name that references a data store. Required.

  • filter (str) – Filters the results using OData syntax. Default value is None.

  • order_by (str) – Sorts the results using OData syntax. Default value is None.

Returns

An iterator like instance of JSON object

Return type

ItemPaged[JSON]

Raises

HttpResponseError

Example

list_invitations(sent_share_id: str, *, filter: Optional[str] = None, order_by: Optional[str] = None, **kwargs: Any)Iterable[collections.abc.MutableMapping[str, Any]][source]

List all sent share invitations in a sent share.

List sent share recipients.

Parameters

sent_share_id (str) – Id of the sent share. Required.

Keyword Arguments
  • filter (str) – Filters the results using OData syntax. Default value is None.

  • order_by (str) – Sorts the results using OData syntax. Default value is None.

Returns

An iterator like instance of JSON object

Return type

ItemPaged[JSON]

Raises

HttpResponseError

Example

notify_user_invitation(sent_share_id: str, sent_share_invitation_id: str, *, repeatability_request_id: Optional[str] = None, **kwargs: Any)collections.abc.MutableMapping[str, Any][source]

Notifies the recipient of the sent share invitation.

Notifies the user recipient of the sent share invitation, does not apply to service invitations.

Parameters
  • sent_share_id (str) – Id of the sent share. Required.

  • sent_share_invitation_id (str) – Id of the sent share invitation. Required.

Keyword Arguments

repeatability_request_id (str) – If specified, the client directs that the request is repeatable; that is, that the client can make the request multiple times with the same Repeatability-Request-Id and get back an appropriate response without the server executing the request multiple times. The value of the Repeatability-Request-Id is an opaque string representing a client-generated, globally unique for all time, identifier for the request. It is recommended to use version 4 (random) UUIDs. Default value is None.

Returns

JSON object

Return type

JSON

Raises

HttpResponseError

Example

class azure.purview.sharing.operations.ShareResourcesOperations(*args, **kwargs)[source]

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through PurviewSharingClient’s share_resources attribute.

list(*, filter: Optional[str] = None, order_by: Optional[str] = None, **kwargs: Any)Iterable[collections.abc.MutableMapping[str, Any]][source]

API operation to list ShareResources.

List share resources.

Keyword Arguments
  • filter (str) – Filters the results using OData syntax. Default value is None.

  • order_by (str) – Sorts the results using OData syntax. Default value is None.

Returns

An iterator like instance of JSON object

Return type

ItemPaged[JSON]

Raises

HttpResponseError

Example

# response body for status code(s): 200
response == {
    "id": "str",  # Optional. The unique id of the resource.
    "receivedSharesCount": 0,  # Optional. A count of Received Shares associated
      with the
      Microsoft.Azure.Purview.Share.ApiService.V3.DataTransferObjects.ShareResource.
    "sentSharesCount": 0,  # Optional. A count of Sent Shares associated with the
      Microsoft.Azure.Purview.Share.ApiService.V3.DataTransferObjects.ShareResource.
    "storeKind": "str",  # Optional. The types of asset. Known values are:
      "AdlsGen2Account" and "BlobAccount".
    "storeReference": {
        "referenceName": "str",  # Optional. Reference name for resource
          associated with the sink or artifact.
        "type": "str"  # Optional. Defines the type of resource being shared.
          "ArmResourceReference"
    },
    "type": "str"  # Optional. Type of the resource.
}