anatools.client.channels module

Channels Functions

add_channel_access(self, channelId, organizationId)

Add access to a channel for an organization.

Parameters
  • channel (str) – Name of channel to add access for.

  • organizationId (str) – Organization ID. Defaults to current if not specified.

Returns

Access status.

Return type

str

create_managed_channel(self, name, organizationId=None, volumes=[], instance='p2.xlarge', timeout=120)

Create a managed channel for your organization.

Parameters
  • organizationId (str) – Organization ID. Defaults to current if not specified.

  • name (name) – Channel name.

  • dataVolumes (str) – Data volume

  • instanceType (str) – AWS Instance type

  • timeout (int) – Timeout

Returns

channel data

Return type

json

deploy_managed_channel(self, channelId=None, image=None)

Deploy the docker image of a channel.

Parameters
  • channelId (str) – Channel ID that you are pushing the image to. If the channelId isn’t specified, it will use the image name to lookup the channelId.

  • image (str) – The image name that is in docker. This should match the channel name when running ana. If image is not specified, it will use the channel name for the channelId.

Returns

Success or failure message about docker registration.

Return type

str

edit_managed_channel(self, channelId, name=None, volumes=None, instance=None, timeout=None, status=None)

Edit a managed channel for your organization.

Parameters
  • channelId (str) – ChannelId ID of the channel to edit.

  • name (name) – The new name to give the channel.

  • volumes ([str]) – Data volumes for the channel.

  • instanceType (str) – Instance type to run the channel on.

  • timeout (int) – Timeout for the channel.

  • status (str) – The status of the channel.

Returns

If true, the channel was successfully edited.

Return type

bool

get_channels(self, organizationId=None, workspaceId=None, channelId=None)

Shows all channels available to the user. Can filter by organizationId, workspaceId, or channelId.

Parameters
  • organizationId (str) – Filter channel list on what’s available to the organization.

  • workspaceId (str) – Filter channel list on what’s available to the workspace.

  • channelId (str) – Filter channel list on the specific channelId.

Returns

List of channels associated with user, workspace, organization or channelId.

Return type

list

get_deployment_status(self, deploymentId, stream=False)

Remove access to a channel for an organization.

Parameters

deploymentId (str) – The DeploymentID to retrieve status for

Returns

Deployment status.

Return type

json

get_managed_channels(self, channelId=None, organizationId=None)

Get managed channels by organization.

Parameters
  • organizationId (str) – Organization ID. Defaults to current if not specified.

  • channel (name) – Channel name to filter.

Returns

channel data

Return type

json

remove_channel_access(self, channelId, organizationId)

Remove access to a channel for an organization.

Parameters
  • channel (str) – Name of channel to remove access to.

  • organizationId (str) – Organization ID. Defaults to current if not specified.

Returns

Access status.

Return type

str