# ibmcloud_python_sdk.resource package

## Submodules

## ibmcloud_python_sdk.resource.resource_binding module

class ibmcloud_python_sdk.resource.resource_binding.ResourceBinding

  Bases: `object`

  create_binding(**kwargs)

    Create resource binding

    Parameters

      - name (str) – The new name of the resource group

      - target (str) – The CRN of application to bind to in a specific environment

      - source (str) – The short or long ID of resource instance or alias

      - parameters (dict, optional) – Configuration options represented as key-value pairs

      - role (str, optional) – The role name or it’s CRN

  delete_binding(binding)

    Delete resource binding

    Parameters

      binding (str) – Resource binding name or ID

    Returns

      Delete status

    Return type

      resource_deleted()

  get_resource_binding(binding)

    Retrieve specific resource binding by name or by ID

    Parameters

      binding (str) – Resource binding name or ID

    Returns

      Resource binding information

    Return type

      dict

  get_resource_binding_by_id(id)

    Retrieve specific resource binding by ID

    Parameters

      id (str) – Resource binding ID

    Returns

      Resource binding information

    Return type

      dict

  get_resource_binding_by_name(name)

    Retrieve specific resource binding by name

    Parameters

      name (str) – Resource binding name

    Returns

      Resource binding information

    Return type

      dict

  get_resource_bindings()

    Retrieve resource binding list

    Returns

      List of resource bindings

    Return type

      list

## ibmcloud_python_sdk.resource.resource_group module

class ibmcloud_python_sdk.resource.resource_group.ResourceGroup

  Bases: `object`

  create_group(**kwargs)

    Create resource group

    Parameters

      - name (str) – Name of the resource group

      - account_id (str) – The account ID of the resource group

  delete_group(group)

    Delete resource group

    Parameters

      group – Resource group name or ID

    Returns

      Delete status

    Return type

      resource_deleted()

  get_default_resource_group()

    Retrieve the default resource group

    Returns

      Default resource group information

    Return type

      dict

  get_quota_definition(quota)

    Retrieve specific quota definition by name or by ID

    Parameters

      quota (str) – Quota definition name or ID

    Returns

      Quota definition

    Return type

      dict

  get_quota_definition_by_id(id)

    Retrieve specific quota definition by ID

    Parameters

      id (str) – Quota definition ID

    Returns

      Quota definition

    Return type

      dict

  get_quota_definition_by_name(name)

    Retrieve specific quota definitnion by name

    Parameters

      name (str) – Quota definition name

    Returns

      Quota definition

    Return type

      dict

  get_quota_definitions()

    Retrieve list of all quota definitions

    Returns

      List of quota definitions

    Return type

      list

  get_resource_group(group)

    Retrieve specific resource group by name or by ID

    Parameters

      group (str) – Resource group name or ID

    Returns

      Resource group information

    Return type

      dict

  get_resource_group_by_id(id)

    Retrieve specific resource group by ID

    Parameters

      id (str) – Resource group ID

    Returns

      Resource group information

    Return type

      dict

  get_resource_group_by_name(name)

    Retrieve specific resource group by name

    Parameters

      name (str) – Resource group name

    Returns

      Resource group information

    Return type

      dict

  get_resource_groups()

    Retrieve resource group list

    Returns

      List of resource groups

    Return type

      list

  get_resource_groups_by_account(id)

    Retrieve resource group list for a specific account

    Parameters

      id (str) – Account ID

    Returns

      Resource group information by account

    Return type

      dict

## ibmcloud_python_sdk.resource.resource_instance module

class ibmcloud_python_sdk.resource.resource_instance.ResourceInstance

  Bases: `object`

  create_resource_instance(**kwargs)

    Create resource instance

    Parameters

      - name (str) – The name of the instance

      - resource_group (str) – Short or long ID of resource group

      - resource_plan (str) – The unique ID of the plan associated with the offering. This value is provided by and stored in the global catalog

      - target (str) – The deployment location where the instance should be hosted

      - tags (list, optional) – Tags that are attached to the instance after provisioning

      - allow_cleanup (bool, optional) – Boolean that dictates if the resource instance should be deleted (cleaned up) during the processing of a region instance delete call

      - parameters (dict, optional) – Configuration options represented as key-value pairs that are passed through to the target resource brokers

    Returns

      Resource instance information

    Return type

      dict

  delete_resource_instance(instance)

    Delete a resource instance

    Parameters

      instance (str) – The resource instance name or ID

    Returns

      Deletion status

    Return type

      resource_deleted()

  get_resource_instance(resource_instance)

    Retrieve specific resource instance by name or by GUID

    Parameters

      resource_instance (str) – Resource instance name or GUID

    Returns

      Resource instance information

    Return type

      dict

  get_resource_instance_by_guid(guid)

    Retrieve specific resoure instance by GUID

    Parameters

      guid – Resource instance GUID

    T̈ype guid

      str

    Returns

      Resource instance information

    Return type

      dict

  get_resource_instance_by_name(name)

    Retrieve specific resoure instance by name

    Parameters

      name (str) – Resource instance name

    Returns

      Resource instance information

    Return type

      dict

  get_resource_instances(resource_group=None)

    Retrieve resource instance list

    Parameters

      resource_group (str, optional) – Filter resource instance by resource group

    Returns

      Resource instance list

    Return type

      list

## ibmcloud_python_sdk.resource.resource_key module

class ibmcloud_python_sdk.resource.resource_key.ResourceKey

  Bases: `object`

  create_key(**kwargs)

    Create resource key

    Parameters

      - name (str) – The new name of the resource group

      - source (str) – The short or long ID of resource instance or alias

      - parameters (dict optional) – Configuration options represented as key-value pairs

      - role – The role name or it’s CRN

    Type

      role: str, optional

  delete_key(key)

    Delete resource key

    Parameters

      key (str) – Resource key name or ID

    Returns

      Delete status

    Return type

      resource_deleted()

  get_resource_key(key)

    Retrieve specific resource key by name or by ID

    Parameters

      key (str) – Resource key name or ID

    Returns

      Resource key information

    Return type

      dict

  get_resource_key_by_id(id)

    Retrieve specific resource key by ID

    Parameters

      id (str) – Resource key ID

    Returns

      Resource key information

    Return type

      dict

  get_resource_key_by_name(name)

    Retrieve specific resource key by name

    Parameters

      name (str) – Resource key name

    Returns

      Resource key information

    Return type

      dict

  get_resource_keys()

    Retrieve resource key list

    Returns

      List of resource keys

    Return type

      list

## Module contents