Globus Connect Server API#
The Globus Connect Server Manager API (GCS Manager API) runs on a Globus Connect Server Endpoint and allows management of the Endpoint, Storage Gateways, Collections, and other resources.
Unlike other Globus services, there is no single central API used to contact
GCS Manager instances. Therefore, the GCSClient
is always initialized with
the FQDN (DNS name) of the GCS Endpoint.
e.g. gcs = GCSClient("abc.def.data.globus.org")
Client#
The primary interface for the GCS Manager API is the GCSClient
class.
- class globus_sdk.GCSClient(gcs_address: str, *, environment: Optional[str] = None, authorizer: Optional[GlobusAuthorizer] = None, app_name: Optional[str] = None, transport_params: Optional[dict[str, Any]] = None)[source]#
Bases:
BaseClient
A GCSClient provides communication with the GCS Manager API of a Globus Connect Server instance. For full reference, see the documentation for the GCS Manager API.
Unlike other client types, this must be provided with an address for the GCS Manager. All other arguments are the same as those for
BaseClient
.- Parameters:
gcs_address (str) – The FQDN (DNS name) or HTTPS URL for the GCS Manager API.
Methods
get_role_list()
,paginated.get_role_list()
get_storage_gateway_list()
,paginated.get_storage_gateway_list()
- static get_gcs_endpoint_scopes(endpoint_id: uuid.UUID | str) GCSEndpointScopeBuilder [source]#
Given a GCS Endpoint ID, this helper constructs an object containing the scopes for that Endpoint.
- Parameters:
endpoint_id (UUID or str) – The ID of the Endpoint
See documentation for
globus_sdk.scopes.GCSEndpointScopeBuilder
for more information.
- static get_gcs_collection_scopes(collection_id: uuid.UUID | str) GCSCollectionScopeBuilder [source]#
Given a GCS Collection ID, this helper constructs an object containing the scopes for that Collection.
- Parameters:
collection_id (UUID or str) – The ID of the Collection
See documentation for
globus_sdk.scopes.GCSCollectionScopeBuilder
for more information.
- static connector_id_to_name(connector_id: Union[UUID, str]) str | None [source]#
Helper that converts a given connector_id into a human readable connector name string. Will return None if the id is not recognized.
Note that it is possible for valid connector_ids to be unrecognized due to differing SDK and GCS versions.
- get_collection_list(*, mapped_collection_id: Optional[Union[UUID, str]] = None, filter: Optional[Union[Iterable[str], str]] = None, include: Optional[Union[Iterable[str], str]] = None, query_params: Optional[dict[str, Any]] = None) IterableGCSResponse [source]#
GET /collections
- Parameters:
mapped_collection_id (str or UUID) – Filter collections which were created using this mapped collection ID.
filter (str or iterable of str, optional) – Filter the returned set to any combination of the following:
mapped_collections
,guest_collections
,managed_by_me
,created_by_me
.include (str or iterable of str, optional) – Names of additional documents to include in the response
query_params (dict, optional) – Additional passthrough query parameters
List the Collections on an Endpoint
External Documentation
See List Collections in the API documentation for details.
- get_collection(collection_id: Union[UUID, str], *, query_params: Optional[dict[str, Any]] = None) UnpackingGCSResponse [source]#
GET /collections/{collection_id}
- Parameters:
Lookup a Collection on an Endpoint
External Documentation
See Get Collection in the API documentation for details.
- create_collection(collection_data: dict[str, Any] | globus_sdk.services.gcs.data.collection.CollectionDocument) UnpackingGCSResponse [source]#
POST /collections
Create a collection. This is used to create either a mapped or a guest collection. When created, a
collection:administrator
role for that collection will be created using the caller’s identity.In order to create a guest collection, the caller must have an identity that matches the Storage Gateway policies.
In order to create a mapped collection, the caller must have an
endpoint:administrator
orendpoint:owner
role.- Parameters:
collection_data (dict or CollectionDocument) – The collection document for the new collection
External Documentation
See Create Collection in the API documentation for details.
- update_collection(collection_id: Union[UUID, str], collection_data: dict[str, Any] | globus_sdk.services.gcs.data.collection.CollectionDocument, *, query_params: Optional[dict[str, Any]] = None) UnpackingGCSResponse [source]#
PATCH /collections/{collection_id}
- Parameters:
collection_id (str or UUID) – The ID of the collection to update
collection_data (dict or CollectionDocument) – The collection document for the modified collection
query_params (dict, optional) – Additional passthrough query parameters
External Documentation
See Update Collection in the API documentation for details.
- delete_collection(collection_id: Union[UUID, str], *, query_params: Optional[dict[str, Any]] = None) GlobusHTTPResponse [source]#
DELETE /collections/{collection_id}
- Parameters:
External Documentation
See Delete Collection in the API documentation for details.
- get_storage_gateway_list(*, include: Optional[Union[Iterable[str], str]] = None, query_params: Optional[dict[str, Any]] = None) IterableGCSResponse [source]#
GET /storage_gateways
- Parameters:
include (str or iterable of str, optional) – Optional document types to include in the response. If ‘private_policies’ is included, then include private storage gateway policies in the attached storage_gateways document. This requires an
administrator
role on the Endpoint.query_params (dict, optional) – Additional passthrough query parameters
This method supports paginated access. To use the paginated variant, give the same arguments as normal, but prefix the method name with
paginated
, as inclient.paginated.get_storage_gateway_list(...)
For more information, see how to make paginated calls.
External Documentation
See List Storage Gateways in the API documentation for details.
- create_storage_gateway(data: dict[str, Any] | globus_sdk.services.gcs.data.storage_gateway.StorageGatewayDocument, *, query_params: Optional[dict[str, Any]] = None) UnpackingGCSResponse [source]#
POST /storage_gateways
- Parameters:
data (dict or StorageGatewayDocument) – Data in the format of a Storage Gateway document, it is recommended to use the
StorageGatewayDocumment
class to construct this data.query_params (dict, optional) – Additional passthrough query parameters
External Documentation
See Create a Storage Gateway in the API documentation for details.
- get_storage_gateway(storage_gateway_id: Union[UUID, str], *, include: Optional[Union[Iterable[str], str]] = None, query_params: Optional[dict[str, Any]] = None) UnpackingGCSResponse [source]#
GET /storage_gateways/<storage_gateway_id>
- Parameters:
storage_gateway_id (str or UUID) – UUID for the Storage Gateway to be gotten
include (str or iterable of str, optional) – Optional document types to include in the response. If ‘private_policies’ is included, then include private storage gateway policies in the attached storage_gateways document. This requires an
administrator
role on the Endpoint.query_params (dict, optional) – Additional passthrough query parameters
External Documentation
See Get a Storage Gateway in the API documentation for details.
- update_storage_gateway(storage_gateway_id: Union[UUID, str], data: dict[str, Any] | globus_sdk.services.gcs.data.storage_gateway.StorageGatewayDocument, *, query_params: Optional[dict[str, Any]] = None) GlobusHTTPResponse [source]#
PATCH /storage_gateways/<storage_gateway_id>
- Parameters:
storage_gateway_id (str or UUID) – UUID for the Storage Gateway to be updated
data (dict or StorageGatewayDocument) – Data in the format of a Storage Gateway document, it is recommended to use the
StorageGatewayDocumment
class to construct this data.query_params (dict, optional) – Additional passthrough query parameters
External Documentation
See Update a Storage Gateway in the API documentation for details.
- delete_storage_gateway(storage_gateway_id: str | uuid.UUID, *, query_params: Optional[dict[str, Any]] = None) GlobusHTTPResponse [source]#
DELETE /storage_gateways/<storage_gateway_id>
- Parameters:
External Documentation
See Delete a Storage Gateway in the API documentation for details.
- get_role_list(collection_id: Optional[Union[UUID, str]] = None, include: Optional[str] = None, query_params: Optional[dict[str, Any]] = None) IterableGCSResponse [source]#
GET /roles
- Parameters:
collection_id (str or UUID, optional) – UUID of a Collection. If given then only roles related to that Collection are returned, otherwise only Endpoint roles are returned.
include (str, optional) – Pass “all_roles” to request all roles all roles relevant to the resource instead of only those the caller has on the resource
query_params (dict, optional) – Additional passthrough query parameters
External Documentation
See List Roles in the API documentation for details.
- create_role(data: dict[str, Any] | globus_sdk.services.gcs.data.role.GCSRoleDocument, query_params: Optional[dict[str, Any]] = None) UnpackingGCSResponse [source]#
POST /roles
- Parameters:
External Documentation
See Create Role in the API documentation for details.
- get_role(role_id: Union[UUID, str], query_params: Optional[dict[str, Any]] = None) UnpackingGCSResponse [source]#
GET /roles/{role_id}
- Parameters:
External Documentation
See Get a Role in the API documentation for details.
- delete_role(role_id: Union[UUID, str], query_params: Optional[dict[str, Any]] = None) GlobusHTTPResponse [source]#
DELETE /roles/{role_id}
- Parameters:
External Documentation
See Delete a Role in the API documentation for details.
- get_user_credential_list(storage_gateway: Optional[Union[UUID, str]] = None, query_params: Optional[dict[str, Any]] = None) IterableGCSResponse [source]#
GET /user_credentials
- Parameters:
External Documentation
See Get User Credential list in the API documentation for details.
- create_user_credential(data: dict[str, Any] | globus_sdk.services.gcs.data.user_credential.UserCredentialDocument, query_params: Optional[dict[str, Any]] = None) UnpackingGCSResponse [source]#
POST /user_credentials
- Parameters:
External Documentation
See Create a User Credential in the API documentation for details.
- get_user_credential(user_credential_id: Union[UUID, str], query_params: Optional[dict[str, Any]] = None) UnpackingGCSResponse [source]#
GET /user_credentials/{user_credential_id}
- Parameters:
External Documentation
See Get a User Credential in the API documentation for details.
- update_user_credential(user_credential_id: Union[UUID, str], data: dict[str, Any] | globus_sdk.services.gcs.data.user_credential.UserCredentialDocument, query_params: Optional[dict[str, Any]] = None) UnpackingGCSResponse [source]#
PATCH /user_credentials/{user_credential_id}
- Parameters:
External Documentation
See Update a User Credential in the API documentation for details.
Helper Objects#
- class globus_sdk.services.gcs.data.ActiveScaleStoragePolicies(DATA_TYPE: str = 's3_storage_policies#1.0.0', s3_endpoint: Optional[str] = None, s3_buckets: Optional[Iterable[str]] = None, s3_user_credential_required: Optional[bool] = None, additional_fields: Optional[dict[str, Any]] = None)[source]#
Bases:
S3StoragePolicies
The ActiveScale Storage Policy is an alias for the S3 Storage Policy. It even uses S3 policy DATA_TYPE.
- class globus_sdk.services.gcs.data.AzureBlobStoragePolicies(DATA_TYPE: str = 'azure_blob_storage_policies#1.0.0', client_id: Optional[str] = None, secret: Optional[str] = None, tenant: Optional[str] = None, account: Optional[str] = None, auth_type: Optional[str] = None, adls: Optional[bool] = None, additional_fields: Optional[dict[str, Any]] = None)[source]#
Bases:
StorageGatewayPolicies
Convenience class for constructing a Azure Blob Storage Policy document to use as the policies parameter when creating a StorageGatewayDocument
- Parameters:
DATA_TYPE (str, optional) – Versioned document type. Defaults to the appropriate type for this class.
client_id (str) – Client ID registered with the MS Application console to access Azure Blob Private.
secret (str) – Secret created to access access MS with the client_id in this policy. Private.
tenant (str) – MS Tenant ID from which to allow user logins. Private.
account (str) – Azure Storage account. Private.
auth_type (str) – Auth type: user, service_principal or user_service_principal
adls (bool) – ADLS support enabled or not. Private.
additional_fields (dict, optional) – Additional data for inclusion in the policy document
- class globus_sdk.services.gcs.data.BlackPearlStoragePolicies(DATA_TYPE: str = 'blackpearl_storage_policies#1.0.0', s3_endpoint: Optional[str] = None, bp_access_id_file: Optional[str] = None, additional_fields: Optional[dict[str, Any]] = None)[source]#
Bases:
StorageGatewayPolicies
Convenience class for constructing a BlackPearl Storage Policy document to use as the
policies
parameter when creating a StorageGatewayDocument.- Parameters:
DATA_TYPE (str, optional) – Versioned document type. Defaults to the appropriate type for this class.
s3_endpoint (str) – The URL of the S3 endpoint of the BlackPearl appliance to use to access collections on this Storage Gateway.
bp_access_id_file (str) – Path to the file which provides mappings from usernames within the configured identity domain to the ID and secret associated with the user’s BlackPearl account
additional_fields (dict, optional) – Additional data for inclusion in the policy document
- class globus_sdk.services.gcs.data.BoxStoragePolicies(DATA_TYPE: str = 'box_storage_policies#1.0.0', enterpriseID: Optional[str] = None, boxAppSettings: Optional[dict[str, Any]] = None, additional_fields: Optional[dict[str, Any]] = None)[source]#
Bases:
StorageGatewayPolicies
Convenience class for constructing a Box Storage Policy document to use as the
policies
parameter when creating a StorageGatewayDocument- Parameters:
DATA_TYPE (str, optional) – Versioned document type. Defaults to the appropriate type for this class.
enterpriseID (str) – Identifies which Box Enterprise this Storage Gateway is authorized to access. Private.
boxAppSettings (dict) – Values that the Storage Gateway uses to identify and authenticate with the Box API. Private.
additional_fields (dict, optional) – Additional data for inclusion in the policy document
- class globus_sdk.services.gcs.data.CephStoragePolicies(DATA_TYPE: str = 'ceph_storage_policies#1.0.0', s3_endpoint: Optional[str] = None, s3_buckets: Optional[Iterable[str]] = None, ceph_admin_key_id: Optional[str] = None, ceph_admin_secret_key: Optional[str] = None, additional_fields: Optional[dict[str, Any]] = None)[source]#
Bases:
StorageGatewayPolicies
Convenience class for constructing a Ceph Storage Policy document to use as the policies parameter when creating a StorageGatewayDocument
- Parameters:
DATA_TYPE (str, optional) – Versioned document type. Defaults to the appropriate type for this class.
s3_endpoint (str) – URL of the S3 API endpoint
s3_buckets (iterable of str) – List of buckets not owned by the collection owner that will be shown in the root of collections created at the base of this Storage Gateway.
ceph_admin_key_id (str) – Administrator key id used to authenticate with the ceph admin service to obtain user credentials. Private.
ceph_admin_secret_key (str) – Administrator secret key used to authenticate with the ceph admin service to obtain user credentials. Private.
additional_fields (dict, optional) – Additional data for inclusion in the policy document
- class globus_sdk.services.gcs.data.CollectionDocument(*, data_type: Optional[str] = None, collection_base_path: Optional[str] = None, contact_email: Optional[str] = None, contact_info: Optional[str] = None, default_directory: Optional[str] = None, department: Optional[str] = None, description: Optional[str] = None, display_name: Optional[str] = None, identity_id: Optional[Union[UUID, str]] = None, info_link: Optional[str] = None, organization: Optional[str] = None, user_message: Optional[str] = None, user_message_link: Optional[str] = None, keywords: Optional[Iterable[str]] = None, disable_verify: Optional[bool] = None, enable_https: Optional[bool] = None, force_encryption: Optional[bool] = None, force_verify: Optional[bool] = None, public: Optional[bool] = None, additional_fields: Optional[dict[str, Any]] = None)[source]#
Bases:
PayloadWrapper
,ABC
This is the base class for
MappedCollectionDocument
andGuestCollectionDocument
.Parameters common to both of those are defined and documented here.
- Parameters:
data_type (str, optional) – Explicitly set the
DATA_TYPE
value for this collection. NormallyDATA_TYPE
is deduced from the provided parameters and should not be set. To maximize compatibility with different versions of GCS, only set this value when necessary.collection_base_path (str, optional) – The location of the collection on its underlying storage. For a mapped collection, this is an absolute path on the storage system named by the
storage_gateway_id
. For a guest collection, this is a path relative to the value of theroot_path
attribute on the mapped collection identified by themapped_collection_id
. This parameter is optional for updates but required when creating a new collection.contact_email (str, optional) – Email address of the support contact for the collection
contact_info (str, optional) – Other contact information for the collection, e.g. phone number or mailing address
default_directory (str, optional) – Default directory when using the collection
department (str, optional) – The department which operates the collection
description (str, optional) – A text description of the collection
display_name (str, optional) – Friendly name for the collection
identity_id (str or UUID, optional) – The Globus Auth identity which acts as the owner of the collection
info_link (str, optional) – Link for more info about the collection
organization (str, optional) – The organization which maintains the collection
user_message (str, optional) – A message to display to users when interacting with this collection
user_message_link (str, optional) – A link to additional messaging for users when interacting with this collection
keywords (iterable of str, optional) – A list of keywords used to help searches for the collection
disable_verify (bool, optional) – Disable verification checksums on transfers to and from this collection
enable_https (bool, optional) – Enable or disable HTTPS support (requires a managed endpoint)
force_encryption (bool, optional) – When set to True, all transfers to and from the collection are always encrypted
force_verify (bool, optional) – Force verification checksums on transfers to and from this collection
public (bool, optional) – If True, the collection will be visible to other Globus users
additional_fields (dict, optional) – Additional data for inclusion in the collection document
- class globus_sdk.services.gcs.data.CollectionPolicies(dict=None, /, **kwargs)[source]#
Bases:
PayloadWrapper
,ABC
This is the abstract base type for Collection Policies documents to use as the
policies
parameter when creating a MappedCollectionDocument.
- class globus_sdk.services.gcs.data.GCSRoleDocument(DATA_TYPE: str = 'role#1.0.0', collection: Optional[Union[UUID, str]] = None, principal: Optional[str] = None, role: Optional[str] = None, additional_fields: Optional[dict[str, Any]] = None)[source]#
Bases:
PayloadWrapper
Convenience class for constructing a Role document to use as the data parameter to create_role
- Parameters:
DATA_TYPE (str) – Versioned document type.
collection (str or UUID, optional) – Collection ID for the collection the role will apply to. This value is omitted when creating an endpoint role or when creating role definitions when creating collections.
principal (str, optional) – Auth identity or group id URN. Should be in the format urn:globus:auth:[identity|group]:{uuid of identity or group}
role (str, optional) – Role assigned to the principal. Known values are owner, administrator, access_manager, activity_manager, and activity_monitor
- class globus_sdk.services.gcs.data.GoogleCloudStorageCollectionPolicies(DATA_TYPE: str = 'google_cloud_storage_collection_policies#1.0.0', project: Optional[str] = None, additional_fields: Optional[dict[str, Any]] = None)[source]#
Bases:
CollectionPolicies
Convenience class for constructing a Google Cloud Storage Collection Policy document to use as the
policies
parameter when creating a CollectionDocument
- class globus_sdk.services.gcs.data.GoogleCloudStoragePolicies(DATA_TYPE: str = 'google_cloud_storage_policies#1.0.0', client_id: Optional[str] = None, secret: Optional[str] = None, service_account_key: Optional[dict[str, Any]] = None, buckets: Optional[Iterable[str]] = None, projects: Optional[Iterable[str]] = None, additional_fields: Optional[dict[str, Any]] = None)[source]#
Bases:
StorageGatewayPolicies
Convenience class for constructing a Google Cloud Storage Policy document to use as the policies parameter when creating a StorageGatewayDocument
- Parameters:
DATA_TYPE (str, optional) – Versioned document type. Defaults to the appropriate type for this class.
client_id (str) – Client ID registered with the Google Application console to access Google Drive. Private.
secret (str) – Secret created to access access Google Drive with the client_id in this policy. Private.
service_account_key (dict) – Credentials for use with service account auth, read from a Google-provided json file. Private.
buckets (iterable of str) – The list of Google Cloud Storage buckets which the Storage Gateway is allowed to access, as well as the list of buckets that will be shown in root level directory listings. If this list is unset, bucket access is unrestricted and all non public credential accessible buckets will be shown in root level directory listings. The value is a list of bucket names.
projects (iterable of str) – The list of Google Cloud Storage projects which the Storage Gateway is allowed to access. If this list is unset, project access is unrestricted. The value is a list of project id strings.
additional_fields (dict, optional) – Additional data for inclusion in the policy document
- class globus_sdk.services.gcs.data.GoogleDriveStoragePolicies(DATA_TYPE: str = 'google_drive_storage_policies#1.0.0', client_id: Optional[str] = None, secret: Optional[str] = None, user_api_rate_quota: Optional[int] = None, additional_fields: Optional[dict[str, Any]] = None)[source]#
Bases:
StorageGatewayPolicies
Convenience class for constructing a Google Drive Storage Policy document to use as the policies parameter when creating a StorageGatewayDocument
- Parameters:
DATA_TYPE (str, optional) – Versioned document type. Defaults to the appropriate type for this class.
client_id (str) – Client ID registered with the Google Application console to access Google Drive. Private.
secret (str) – Secret created to access access Google Drive with the client_id in this policy. Private.
user_api_rate_quota (int) – User API Rate quota associated with this client ID.
additional_fields (dict, optional) – Additional data for inclusion in the policy document
- class globus_sdk.services.gcs.data.GuestCollectionDocument(*, data_type: Optional[str] = None, collection_base_path: Optional[str] = None, contact_email: Optional[str] = None, contact_info: Optional[str] = None, default_directory: Optional[str] = None, department: Optional[str] = None, description: Optional[str] = None, display_name: Optional[str] = None, identity_id: Optional[Union[UUID, str]] = None, info_link: Optional[str] = None, organization: Optional[str] = None, user_message: Optional[str] = None, user_message_link: Optional[str] = None, keywords: Optional[Iterable[str]] = None, disable_verify: Optional[bool] = None, enable_https: Optional[bool] = None, force_encryption: Optional[bool] = None, force_verify: Optional[bool] = None, public: Optional[bool] = None, mapped_collection_id: Optional[Union[UUID, str]] = None, user_credential_id: Optional[Union[UUID, str]] = None, additional_fields: Optional[dict[str, Any]] = None)[source]#
Bases:
CollectionDocument
An object used to represent a Guest Collection for creation or update operations. The initializer supports all writable fields on Guest Collections but does not include read-only fields like
id
.Because these documents may be used for updates, no fields are strictly required. However, GCS will require the following fields for creation:
mapped_collection_id
user_credential_id
collection_base_path
All parameters for
CollectionDocument
are supported in addition to the parameters below.
- class globus_sdk.services.gcs.data.HPSSStoragePolicies(DATA_TYPE: str = 'hpss_storage_policies#1.0.0', authentication_mech: Optional[str] = None, authenticator: Optional[str] = None, uda_checksum_support: Optional[bool] = None, additional_fields: Optional[dict[str, Any]] = None)[source]#
Bases:
StorageGatewayPolicies
Convenience class for constructing a HPSS Storage Policy document to use as the policies parameter when creating a StorageGatewayDocument
- Parameters:
DATA_TYPE (str, optional) – Versioned document type. Defaults to the appropriate type for this class.
authentication_mech (str) – Authentication mechanism to use with HPSS.
authenticator (str) – Authentication credentials to use with HPSS.
uda_checksum_support (bool) – Flag indicating whether checksums should be stored in metadata.
additional_fields (dict, optional) – Additional data for inclusion in the policy document
- class globus_sdk.services.gcs.data.IrodsStoragePolicies(DATA_TYPE: str = 'irods_storage_policies#1.0.0', irods_environment_file: Optional[str] = None, irods_authentication_file: Optional[str] = None, additional_fields: Optional[dict[str, Any]] = None)[source]#
Bases:
StorageGatewayPolicies
Convenience class for constructing an iRODS Storage Policy document to use as the policies parameter when creating a StorageGatewayDocument
- Parameters:
DATA_TYPE (str, optional) – Versioned document type. Defaults to the appropriate type for this class.
irods_environment_file (str) – Path to iRODS environent file on the endpoint
irods_authentication_file (str) – Path to iRODS authentication file on the endpoint
additional_fields (dict, optional) – Additional data for inclusion in the policy document
- class globus_sdk.services.gcs.data.MappedCollectionDocument(*, data_type: Optional[str] = None, collection_base_path: Optional[str] = None, contact_email: Optional[str] = None, contact_info: Optional[str] = None, default_directory: Optional[str] = None, department: Optional[str] = None, description: Optional[str] = None, display_name: Optional[str] = None, identity_id: Optional[Union[UUID, str]] = None, info_link: Optional[str] = None, organization: Optional[str] = None, user_message: Optional[str] = None, user_message_link: Optional[str] = None, keywords: Optional[Iterable[str]] = None, disable_verify: Optional[bool] = None, enable_https: Optional[bool] = None, force_encryption: Optional[bool] = None, force_verify: Optional[bool] = None, public: Optional[bool] = None, domain_name: Optional[str] = None, guest_auth_policy_id: Optional[Union[UUID, str]] = None, storage_gateway_id: Optional[Union[UUID, str]] = None, sharing_users_allow: Optional[Iterable[str]] = None, sharing_users_deny: Optional[Iterable[str]] = None, sharing_restrict_paths: Optional[dict[str, Any]] = None, allow_guest_collections: Optional[bool] = None, disable_anonymous_writes: Optional[bool] = None, policies: Optional[Union[CollectionPolicies, dict[str, Any]]] = None, additional_fields: Optional[dict[str, Any]] = None)[source]#
Bases:
CollectionDocument
An object used to represent a Mapped Collection for creation or update operations. The initializer supports all writable fields on Mapped Collections but does not include read-only fields like
id
.Because these documents may be used for updates, no fields are strictly required. However, GCS will require the following fields for creation:
storage_gateway_id
collection_base_path
All parameters for
CollectionDocument
are supported in addition to the parameters below.- Parameters:
storage_gateway_id (str or UUID, optional) – The ID of the storage gateway which hosts this mapped collection. This parameter is required when creating a collection.
domain_name (str, optional) – DNS name of the virtual host serving this collection
guest_auth_policy_id (UUID or str, optional) – Globus Auth policy ID to set on a mapped collection which is then inherited by its guest collections.
sharing_users_allow (iterable of str, optional) – Connector-specific usernames allowed to create guest collections
sharing_users_deny (iterable of str, optional) – Connector-specific usernames forbidden from creating guest collections
allow_guest_collections (bool, optional) – Enable or disable creation and use of Guest Collections on this Mapped Collection
disable_anonymous_writes (bool, optional) – Allow anonymous write ACLs on Guest Collections attached to this Mapped Collection. This option is only usable on non high-assurance collections
policies (dict, optional) – Connector-specific collection policies
sharing_restrict_paths (dict, optional) – A PathRestrictions document
- class globus_sdk.services.gcs.data.OneDriveStoragePolicies(DATA_TYPE: str = 'onedrive_storage_policies#1.0.0', client_id: Optional[str] = None, secret: Optional[str] = None, tenant: Optional[str] = None, user_api_rate_limit: Optional[int] = None, additional_fields: Optional[dict[str, Any]] = None)[source]#
Bases:
StorageGatewayPolicies
Convenience class for constructing a OneDrive Storage Policy document to use as the policies parameter when creating a StorageGatewayDocument
- Parameters:
DATA_TYPE (str, optional) – Versioned document type. Defaults to the appropriate type for this class.
client_id (str) – Client ID registered with the MS Application console to access OneDrive. Private.
secret (str) – Secret created to access access MS with the client_id in this policy. Private.
tenant (str or None) – MS Tenant ID from which to allow user logins. Private.
user_api_rate_limit (int) – User API Rate limit associated with this client ID.
additional_fields (dict, optional) – Additional data for inclusion in the policy document
- class globus_sdk.services.gcs.data.POSIXCollectionPolicies(DATA_TYPE: str = 'posix_collection_policies#1.0.0', sharing_groups_allow: Optional[Union[Iterable[str], str]] = None, sharing_groups_deny: Optional[Union[Iterable[str], str]] = None, additional_fields: Optional[dict[str, Any]] = None)[source]#
Bases:
CollectionPolicies
Convenience class for constructing a Posix Collection Policy document to use as the policies parameter when creating a CollectionDocument
- Parameters:
DATA_TYPE (str, optional) – Versioned document type. Defaults to the appropriate type for this class.
sharing_groups_allow (iterable of str, optional) – POSIX groups which are allowed to create guest collections.
sharing_groups_deny (iterable of str, optional) – POSIX groups which are not allowed to create guest collections.
additional_fields (dict, optional) – Additional data for inclusion in the policy document
- class globus_sdk.services.gcs.data.POSIXStagingCollectionPolicies(DATA_TYPE: str = 'posix_staging_collection_policies#1.0.0', sharing_groups_allow: Optional[Union[Iterable[str], str]] = None, sharing_groups_deny: Optional[Union[Iterable[str], str]] = None, additional_fields: Optional[dict[str, Any]] = None)[source]#
Bases:
CollectionPolicies
Convenience class for constructing a Posix Staging Collection Policy document to use as the
policies
parameter when creating a CollectionDocument- Parameters:
DATA_TYPE (str, optional) – Versioned document type. Defaults to the appropriate type for this class.
sharing_groups_allow (iterable of str, optional) – POSIX groups which are allowed to create guest collections.
sharing_groups_deny (iterable of str, optional) – POSIX groups which are not allowed to create guest collections.
additional_fields (dict, optional) – Additional data for inclusion in the policy document
- class globus_sdk.services.gcs.data.POSIXStagingStoragePolicies(DATA_TYPE: str = 'posix_staging_storage_policies#1.0.0', groups_allow: Optional[Iterable[str]] = None, groups_deny: Optional[Iterable[str]] = None, stage_app: Optional[str] = None, environment: Optional[Iterable[dict[str, str]]] = None, additional_fields: Optional[dict[str, Any]] = None)[source]#
Bases:
StorageGatewayPolicies
Convenience class for constructing a POSIX Staging Storage Policy document to use as the
policies
parameter when creating a StorageGatewayDocument- Parameters:
DATA_TYPE (str, optional) – Versioned document type. Defaults to the appropriate type for this class.
groups_allow (iterable of str, optional) – List of POSIX group IDs allowed to access this Storage Gateway. Private.
groups_deny (iterable of str, optional) – List of POSIX group IDs denied access this Storage Gateway. Private.
stage_app (str, optional) – Path to the stage app. Private.
environment (iterable of dict, optional) – A mapping of variable names to values to set in the environment when executing the
stage_app
. Private.additional_fields (dict, optional) – Additional data for inclusion in the policy document
- class globus_sdk.services.gcs.data.POSIXStoragePolicies(DATA_TYPE: str = 'posix_storage_policies#1.0.0', groups_allow: Optional[Iterable[str]] = None, groups_deny: Optional[Iterable[str]] = None, additional_fields: Optional[dict[str, Any]] = None)[source]#
Bases:
StorageGatewayPolicies
Convenience class for constructing a POSIX Storage Policy document to use as the
policies
parameter when creating a StorageGatewayDocument- Parameters:
DATA_TYPE (str, optional) – Versioned document type. Defaults to the appropriate type for this class.
groups_allow (iterable of str, optional) – List of POSIX group IDs allowed to access this Storage Gateway. Private.
groups_deny (iterable of str, optional) – List of POSIX group IDs denied access this Storage Gateway. Private.
additional_fields (dict, optional) – Additional data for inclusion in the policy document
- class globus_sdk.services.gcs.data.S3StoragePolicies(DATA_TYPE: str = 's3_storage_policies#1.0.0', s3_endpoint: Optional[str] = None, s3_buckets: Optional[Iterable[str]] = None, s3_user_credential_required: Optional[bool] = None, additional_fields: Optional[dict[str, Any]] = None)[source]#
Bases:
StorageGatewayPolicies
Convenience class for constructing a Google Cloud Storage Policy document to use as the policies parameter when creating a StorageGatewayDocument
- Parameters:
DATA_TYPE (str, optional) – Versioned document type. Defaults to the appropriate type for this class.
s3_endpoint (str) – URL of the S3 API endpoint
s3_buckets (iterable of str) – List of buckets not owned by the collection owner that will be shown in the root of collections created at the base of this Storage Gateway.
s3_user_credential_required (str) – Flag indicating if a Globus User must register a user credential in order to create a Guest Collection on this Storage Gateway.
additional_fields (dict, optional) – Additional data for inclusion in the policy document
- class globus_sdk.services.gcs.data.StorageGatewayDocument(DATA_TYPE: Optional[str] = None, display_name: Optional[str] = None, connector_id: Optional[Union[UUID, str]] = None, root: Optional[str] = None, identity_mappings: Union[None, Iterable[dict[str, Any]]] = None, policies: Optional[Union[StorageGatewayPolicies, dict[str, Any]]] = None, allowed_domains: Optional[Iterable[str]] = None, high_assurance: Optional[bool] = None, require_mfa: Optional[bool] = None, authentication_timeout_mins: Optional[int] = None, users_allow: Optional[Iterable[str]] = None, users_deny: Optional[Iterable[str]] = None, additional_fields: Optional[dict[str, Any]] = None)[source]#
Bases:
PayloadWrapper
Convenience class for constructing a Storage Gateway document to use as the data parameter to
create_storage_gateway
orupdate_storage_gateway
- Parameters:
DATA_TYPE (str, optional) – Versioned document type. Defaults to the appropriate type for this class.
display_name (str, optional) – Name of the Storage Gateway
connector_id (str, optional) – UUID of the connector type that this Storage Gateway interacts with.
identity_mappings (iterable of dict, optional) – A list of IdentityMapping objects which are applied to user identities to attempt to determine what accounts are available for access.
policies (dict or StorageGatewayPolicy, optional) – Connector specific storage policies. It is recommended that you use one of the policy helper classes (e.g. POSIXStoragePolicies if you are using the POSIX connector) to create these.
allowed_domains (iterable of string) – List of allowed domains. Users creating credentials or collections on this Storage Gateway must have an identity in one of these domains.
restrict_paths (dict, optional) – Path restrictions within this Storage Gateway. Private.
high_assurance (bool, optional) – Flag indicating if the Storage Gateway requires high assurance features.
authentication_timeout_mins (int, optional) – Timeout (in minutes) during which a user is required to have authenticated in a session to access this storage gateway.
users_allow (iterable of str, optional) – List of connector-specific usernames allowed to access this Storage Gateway. Private.
users_deny (iterable of str, optional) – List of connector-specific usernames denied access to this Storage Gateway. Private.
process_user (str, optional) – Local POSIX user the GridFTP server should run as when accessing this Storage Gateway.
load_dsi_module (str, optional) – Name of the DSI module to load by the GridFTP server when accessing this Storage Gateway.
require_mfa (bool, optional) – Flag indicating that the Storage Gateway requires multi-factor authentication. Only usable on high assurance Storage Gateways.
additional_fields (dict, optional) – Additional data for inclusion in the Storage Gateway document
- class globus_sdk.services.gcs.data.StorageGatewayPolicies(dict=None, /, **kwargs)[source]#
Bases:
PayloadWrapper
,ABC
This is the abstract base type for Storage Policies documents to use as the
policies
parameter when creating a StorageGatewayDocument.Several fields on policy documents are marked as
Private
. This means that they are not visible except to admins and owners of the storage gateway.
- class globus_sdk.services.gcs.data.UserCredentialDocument(DATA_TYPE: str = 'user_credential#1.0.0', identity_id: Optional[Union[UUID, str]] = None, connector_id: Optional[Union[UUID, str]] = None, username: Optional[str] = None, display_name: Optional[str] = None, storage_gateway_id: Optional[Union[UUID, str]] = None, policies: Optional[dict[str, Any]] = None, additional_fields: Optional[dict[str, Any]] = None)[source]#
Bases:
PayloadWrapper
Convenience class for constructing a UserCredential document to use as the data parameter to create_user_credential and update_user_credential
- Parameters:
DATA_TYPE (str) – Versioned document type.
identity_id (UUID or str, optional) – UUID of the Globus identity this credential will provide access for
connector_id (UUID or str, optional) – UUID of the connector this credential is for
username (str, optional) – Username of the local account this credential will provide access to, format is connector specific
display_name (str, optional) – Display name for this credential
storage_gateway_id (UUID or str, optional) – UUID of the storage gateway this credential is for
policies (dict, optional) – Connector specific policies for this credential
additional_fields (dict, optional) – Additional data for inclusion in the document
Client Errors#
When an error occurs, a GCSClient
will raise this specialized type of
error, rather than a generic GlobusAPIError
.
- class globus_sdk.GCSAPIError(r: Response)[source]#
Bases:
GlobusAPIError
Error class for the GCS Manager API client
GCS Responses#
- class globus_sdk.services.gcs.response.IterableGCSResponse(response: Response | GlobusHTTPResponse, client: globus_sdk.BaseClient | None = None, *, iter_key: str | None = None)[source]#
Bases:
IterableResponse
Response class for non-paged list oriented resources. Allows top level fields to be accessed normally via standard item access, and also provides a convenient way to iterate over the sub-item list in the
data
key:>>> print("Path:", r["path"]) >>> # Equivalent to: for item in r["data"] >>> for item in r: >>> print(item["name"], item["type"])
- class globus_sdk.services.gcs.response.UnpackingGCSResponse(response: GlobusHTTPResponse, match: Union[str, Callable[[dict[str, Any]], bool]])[source]#
Bases:
GlobusHTTPResponse
An “unpacking” response looks for a “data” array in the response data, which is expected to have dict elements. The “data” is traversed until the first matching object is found, and this is presented as the
data
property of the response.The full response data is available as
full_data
.If the expected datatype is not found in the array, or the array is missing, the
data
will be the full response data (identical tofull_data
).- Parameters:
match (str or callable) – Either a string containing a DATA_TYPE prefix, or an arbitrary callable which does the matching