# ibmcloud_python_sdk.vpc package

## Submodules

## ibmcloud_python_sdk.vpc.acl module

class ibmcloud_python_sdk.vpc.acl.Acl

  Bases: `object`

  create_network_acl(**kwargs)

    Create network ACL

    Parameters

      - name (str, optional) – The unique user-defined name for this network ACL

      - resource_group (str, optional) – The resource group to use

      - vpc (str) – The VPC the network ACL is to be a part of

      - rules (list, optional) – Array of prototype objects for rules to create along with this network ACL

      - source_network_acl (str, optional) – Network ACL to copy rules from

  create_network_acl_rule(**kwargs)

    Create network ACL rule

    Parameters

      - name (str, optional) – The unique user-defined name for this network ACL

      - resource_group (str, optional) – The resource group to use

      - vpc (str) – The VPC the network ACL is to be a part of

      - rules (list, optional) – Array of prototype objects for rules to create along with this network ACL

  delete_network_acl(acl)

    Delete network ACL

    Parameters

      acl (str) – Network ACL name or ID

    Returns

      Delete status

    Return type

      dict

  delete_network_acl_rule(acl, rule)

    Delete network ACL rule

    Parameters

      - acl (str) – Network ACL name or ID

      - rule (str) – Rule name or ID

    Returns

      Delete status

    Return type

      dict

  get_network_acl(acl)

    Retrieve specific network ACL

    Parameters

      acl (str) – Network ACL name or ID

    Returns

      Network ACL information

    Return type

      dict

  get_network_acl_by_id(id)

    Retrieve specific network ACL by ID

    Parameters

      id (str) – Network ACL ID

    Returns

      Network ACL information

    Return type

      dict

  get_network_acl_by_name(name)

    Retrieve specific network ACL by name

    Parameters

      name (str) – Network ACL name

    Returns

      Network ACL information

    Return type

      dict

  get_network_acl_rule(acl, rule)

    Retrieve specific rule for a specific network ACL

    Parameters

      - acl (str) – Network ACL name or ID

      - rule (str) – Rule name or ID

    Returns

      Network ACL rule information

    Return type

      dict

  get_network_acl_rule_by_id(acl, id)

    Retrieve specific rule for a specific network ACL by ID

    Parameters

      - acl (str) – Network ACL name or ID

      - id (str) – Rule ID

    Returns

      Network ACL rule information

    Return type

      dict

  get_network_acl_rule_by_name(acl, name)

    Retrieve specific rule for a specific network ACL by name

    Parameters

      - acl (str) – Network ACL name or ID

      - name (str) – Rule name

    Returns

      Network ACL rule information

    Return type

      dict

  get_network_acl_rules(acl)

    Retrieve rules for a specific network ACL

    Parameters

      acl (str) – Network ACL

    Returns

      Network ACL rules list

    Return type

      list

  get_network_acl_rules_by_id(id)

    Retrieve rules for a specific network ACL by ID

    Parameters

      id (str) – Network ACL ID

    Returns

      Network ACL rules list

    Return type

      dict

  get_network_acl_rules_by_name(name)

    Retrieve rules for a specific network ACL by name

    Parameters

      name (str) – Network ACL name

    Returns

      Network ACL rules list

    Return type

      list

  get_network_acls()

    Retrieve network ACL list

    Returns

      List of network ACLs

    Return type

      list

## ibmcloud_python_sdk.vpc.floating_ip module

class ibmcloud_python_sdk.vpc.floating_ip.Fip

  Bases: `object`

  get_floating_ip(fip)

    Retrieve specific floating IP

    Parameters

      fip (str) – Floating IP name, ID or address

    Returns

      Floating IP information

    Return type

      dict

  get_floating_ip_by_address(address)

    Retrieve specific floating IP by address

    Parameters

      address (str) – Floating IP address

    Returns

      Floating IP information

    Return type

      dict

  get_floating_ip_by_id(id)

    Retrieve specific floating IP by ID

    Parameters

      id (str) – Floating IP ID

    Returns

      Floating IP information

    Return type

      dict

  get_floating_ip_by_name(name)

    Retrieve specific floating IP by name

    Parameters

      name (str) – Floating IP name

    Returns

      Floating IP information

    Return type

      dict

  get_floating_ips()

    Retrieve floating IP list

    Returns

      List of floating IPs

    Return type

      list

  release_floating_ip(fip)

    Release floating IP

    Parameters

      fip (str) – Floating IP name, ID or address

  reserve_floating_ip(**kwargs)

    Create floating IP

    Parameters

      - name (str, optional) – The unique user-defined name for this floating IP

      - resource_group (str, optional) – The resource group to use

      - target (str, optional) – The target this address is to be bound to

      - zone (str, optional) – The identity of the zone to provision a floating IP in

## ibmcloud_python_sdk.vpc.gateway module

class ibmcloud_python_sdk.vpc.gateway.Gateway

  Bases: `object`

  create_public_gateway(**kwargs)

    Create public gateway

    Parameters

      - name (str, optional) – The unique user-defined name for this subnet

      - resource_group (str, optional) – The resource group to use

      - floating_ip (str, optional) – Identifies a floating IP by a unique property

      - vpc (str) – The VPC the public gateway is to be a part of

      - zone (str) – The zone the public gateway is to reside in

  delete_public_gateway(gateway)

    Delete public gateway

    Parameters

      gateway (str) – Public gateway name or ID

    Returns

      Delete status

    Return type

      dict

  get_public_gateway(gateway)

    Retrieve specific public gateway

    Parameters

      gateway (str) – Public gateway name or ID

    Returns

      Public gateway information

    Return type

      dict

  get_public_gateway_by_id(id)

    Retrieve specific public gateway by ID

    Parameters

      id (str) – Public gateway ID

    Returns

      Public gateway information

    Return type

      dict

  get_public_gateway_by_name(name)

    Retrieve specific public gateway by name

    Parameters

      name (str) – Public gateway name

    Returns

      Public gateway information

    Return type

      dict

  get_public_gateways()

    Retrieve public gateways list

    Returns

      List of public gateways

    Return type

      list

## ibmcloud_python_sdk.vpc.geo module

class ibmcloud_python_sdk.vpc.geo.Geo

  Bases: `object`

  get_region(region)

    Retrieve specific region

    Parameters

      region (str) – Region name

    Returns

      Region information

    Return type

      dict

  get_region_zone(region, zone)

    Retrieve specific zone for a specific region

    Parameters

      - region (str) – Region name

      - zone (str) – Zone name

    Returns

      Zone information

    Return type

      dict

  get_region_zones(region)

    Retrieve zone list for a specific region

    Parameters

      region (str) – Region name

    Returns

      List of zones for a specific region

    Return type

      list

  get_regions()

    Retrieve region list

    Returns

      List of regions

    Return type

      list

## ibmcloud_python_sdk.vpc.image module

class ibmcloud_python_sdk.vpc.image.Image

  Bases: `object`

  create_image(**kwargs)

    Create image

    Parameters

      - name (str, optional) – The unique user-defined name for this image

      - resource_group (str, optional) – The resource group to use

      - file (str) – The file from which to create the image

      - format (str) – The format of the image and the image file

      - source_volume (str) – The volume from which to create the image

      - operating_system (str) – The operating system included in this image

    Returns

      Image information

    Return type

      dict

  delete_image(image)

    Delete image

    Parameters

      image (str) – Image name or ID

    Returns

      Delete status

    Return type

      dict

  get_image(image)

    Retrieve specific image

    Parameters

      image (str) – Image name or ID

    Returns

      Image information

    Return type

      dict

  get_image_by_id(id)

    Retrieve specific image by ID

    Parameters

      id (str) – Image ID

    Returns

      Image information

    Return type

      dict

  get_image_by_name(name)

    Retrieve specific image by name

    Parameters

      name (str) – Image name

    Returns

      Image information

    Return type

      dict

  get_images()

    Retrieve image list

    Returns

      List of images

    Return type

      list

  get_operating_system(name)

    Retrieve specific operating system

    Parameters

      name (str) – Operating system name

    Returns

      Operating system information

    Return type

      dict

  get_operating_systems()

    Retrieve operating system list

    Returns

      List of operating systems

    Return type

      list

## ibmcloud_python_sdk.vpc.instance module

class ibmcloud_python_sdk.vpc.instance.Instance

  Bases: `object`

  associate_floating_ip(**kwargs)

    Associate floating IP with a network interface on an instance

    Parameters

      - instance (str) – Instance name or ID

      - interface (str) – The network interface name or ID

      - fip (str) – The floting IP name, ID or address

  attach_volume(**kwargs)

    Attach a volume to an instance

    Parameters

      - instance (str) – The instance name or ID

      - volume (str) – The identity of the volume to attach to the instance

      - delete_volume_on_instance_delete (bool, optional) – If set to true, when deleting the instance the volume will also be deleted

      - name (str) – The user-defined name for this volume attachment

  create_instance(**kwargs)

    Create VSI

    Parameters

      - name (str, optional) – The unique user-defined name for this virtual server instance

      - keys (list, optional) – The public SSH keys to install on the virtual server instance

      - network_interfaces (list, optional) – Collection of additional network interfaces to create for the virtual server instance

      - placement_target (str, optional) – The placement for the virtual server instance

      - profile (str) – The profile to use for this virtual server instance

      - resource_group (str, optional) – The resource group to use

      - user_data (str, optional) – User data to be made available when setting up the virtual server instance

      - volume_attachments (list, optional) – Collection of volume attachments

      - boot_volume_attachment (str, optional) – The boot volume attachment for the virtual server instance

      - source_template (str, optional) – The unique identifier for this instance template

      - image (str, optional) – The identity of the image to be used when provisioning the virtual server instance

      - primary_network_interface (str, optional) – Primary network interface

      - vpc (str) – The VPC the virtual server instance is to be a part of

      - zone (str, optional) – The identity of the zone to provision the virtual server instance in

  create_instance_action(**kwargs)

    Create instance action

    Parameters

      - instance (str) – The instance name or ID

      - type (str) – The type of action

      - force (bool, optional) – If set to true, the action will be forced immediately, and all queued actions deleted. Ignored for the start action

  create_instance_interface(**kwargs)

    Create instance interface

    Parameters

      - instance (str) – The instance name or ID

      - subnet (str) – The associated subnet name or ID

      - primary_ipv4_address (str, optional) – The primary IPv4 address

      - security_groups (str, optional) – Collection of security groups

  delete_instance(instance)

    Delete instance

    Parameters

      instance (str) – Instance name or ID

    Returns

      Delete status

    Return type

      dict

  delete_instance_interface(instance, interface)

    Delete interface from instance

    Parameters

      - instance (str) – Instance name or ID

      - interface (str) – Interface name or ID

    Returns

      Delete status

    Return type

      dict

  detach_volume(instance, attachment)

    Detach volume from an instance

    Parameters

      - instance (str) – Instance name or ID

      - attachment (str) – Volume attachement name or ID

  disassociate_floating_ip(instance, interface, fip)

    Disassociate floating IP from a network interface on an instance

    Parameters

      - instance (str) – Instance name or ID

      - interface (str) – Interface name or ID

    Parem fip

      Floating IP name, ID or address

  get_instance(instance)

    Retrieve specific instance

    Parameters

      instance (str) – Instance name or ID

    Returns

      Instance information

    Return type

      dict

  get_instance_by_id(id)

    Retrieve specific instance by ID

    Parameters

      id (str) – Instance ID

    Returns

      Instance information

    Return type

      dict

  get_instance_by_name(name)

    Retrieve specific instance by name

    Parameters

      name (str) – Instance name

    Returns

      Instance information

    Return type

      dict

  get_instance_configuration(instance)

    Retrieve initial configuration for a specific instance

    Parameters

      instance (str) – Instance name or ID

    Returns

      Instance configuration information

    Return type

      dict

  get_instance_configuration_by_id(id)

    Retrieve initial configuration for a specific instance by ID

    Parameters

      id (str) – Instance ID

    Returns

      Instance configuration information

    Return type

      dict

  get_instance_configuration_by_name(name)

    Retrieve initial configuration for a specific instance by name

    Parameters

      name (str) – Instance name

    Returns

      Instance configuration information

    Return type

      dict

  get_instance_interface(instance, interface)

    Retrieve specific network interface for a specific instance

    Parameters

      - instance (str) – Instance name or ID

      - interface (str) – Interface name or ID

    Returns

      Instance’s interface information

    Return type

      dict

  get_instance_interface_by_id(instance, id)

    Retrieve specific network interface for a specific instance by ID

    Parameters

      - instance (str) – Instance name or ID

      - id (str) – Interface ID

    Returns

      Instance’s interface information

    Return type

      dict

  get_instance_interface_by_name(instance, name)

    Retrieve specific network interface for a specific instance by ID

    Parameters

      - instance (str) – Instance name or ID

      - name (str) – Interface name

    Returns

      Instance’s interface information

    Return type

      dict

  get_instance_interface_fip(instance, interface, floating)

    Retrieve specific floating IP attached to a network interface for a specific instance

    Parameters

      - instance (str) – Instance name or ID

      - interface (str) – Interface name or ID

    Parem floating

      Floating IP name, ID or address

    Returns

      Floating IP information

    Return type

      dict

  get_instance_interface_fips(instance, interface)

    Retrieve floating IPs attached to a network interface for a specific instance

    Parameters

      - instance (str) – Instance name or ID

      - interface (str) – Interface name or ID

    Returns

      Floating IP list attached to an interface

    Return type

      list

  get_instance_interfaces(instance)

    Retrieve network interfaces for a specific instance

    Parameters

      instance (str) – Instance name or ID

    Returns

      List of instance’s interfaces

    Return type

      list

  get_instance_interfaces_by_id(id)

    Retrieve network interfaces for a specific instance by ID

    Parameters

      id (str) – Instance ID

    Returns

      List of instance’s interfaces

    Return type

      list

  get_instance_interfaces_by_name(name)

    Retrieve network interfaces for a specific instance by name

    Parameters

      name (str) – Instance name

    Returns

      List of instance’s interfaces

    Return type

      list

  get_instance_profile(profile)

    Retrieve specific instance profile

    Parameters

      profile (str) – Instance profile name or ID

    Returns

      Profile information

    Return type

      dict

  get_instance_profiles()

    Retrieve instance profile list

    Returns

      List of instance profiles:

    Return type

      list

  get_instance_volume_attachment(instance, attachment)

    Retrieve specific volume attached to a specific instance

    Parameters

      - instance (str) – Instance name or ID

      - attachment (str) – Volume attachment name or ID

    Returns

      Volume attachment information

    Return type

      dict

  get_instance_volume_attachments(instance)

    Retrieve volume attachments to a specific instance

    Parameters

      instance (str) – Instance name or ID

    Returns

      List of volume attachments

    Return type

      list

  get_instances()

    Retrieve instances list

    Returns

      List of instances

    Return type

      list

## ibmcloud_python_sdk.vpc.key module

class ibmcloud_python_sdk.vpc.key.Key

  Bases: `object`

  create_key(**kwargs)

    Create key

    Parameters

      - name (str, optional) – The unique user-defined name for this key

      - resource_group (str, optional) – The resource group to use

      - public_key (str) – A unique public SSH key to import, encoded in PEM format

      - type (str, optional) – The cryptosystem used by this key

  delete_key(key)

    Delete key

    Parameters

      key (str) – Key name or ID

    Returns

      Delete status

    Return type

      dict

  get_key(key)

    Retrieve specific key

    Parameters

      key (str) – Key name or ID

    Returns

      Key information

    Return type

      dict

  get_key_by_id(id)

    Retrieve specific key by ID

    Parameters

      id (str) – Key ID

    Returns

      Key information

    Return type

      dict

  get_key_by_name(name)

    Retrieve specific key by name

    Parameters

      name (str) – Key name

    Returns

      Key information

    Return type

      dict

  get_keys()

    Retrieve key list

    Returns

      List of keys

    Return type

      list

## ibmcloud_python_sdk.vpc.loadbalancer module

class ibmcloud_python_sdk.vpc.loadbalancer.Loadbalancer

  Bases: `object`

  create_lb(**kwargs)

    Create load balancer

    Parameters

      - name (str, optional) – The user-defined name for this load balancer

      - subnets (list) – The subnets to provision this load balancer

      - is_public (str) – The type of this load balancer, public or private

      - listeners (list, optional) – The listeners of this load balancer

      - pools (list, optional) – The pools of this load balancer

      - profile (str, optional) – The profile to use for this load balancer

      - resource_group (str, optional) – The resource group for this load balancer

  create_listener(**kwargs)

    Create listener

    Parameters

      - lb (str) – Load balancer name or ID

      - certificate_instance (str, optional) – The certificate instance used for SSL termination

      - connection_limit (int, optional) – The connection limit of the listener

      - default_pool (str, optional) – The default pool associated with the listener

      - policies (list, optional) – The list of policies of this listener

      - port – The listener port number

      - protocol (str) – The listener protocol

  create_member(**kwargs)

    Create member and add member to the pool

    Parameters

      - lb (str) – Load balancer name or ID

      - pool (str) – Pool name or ID

      - port (int) – The port number of the application running in the server member

      - target (str) – The members for this load balancer pool

      - weight (int, optional) – The user-defined name for this load balancer pool

  create_policy(**kwargs)

    Create policy

    Parameters

      - lb (str) – Load balancer name or ID

      - listener (str) – Listener port or ID

      - action (str) – The policy action

      - name (str, optional) – The user-defined name for this policy

      - priority (int) – Priority of the policy

      - rules – The list of rules of this policy

      - target (str, optional) – Target depending the action defined

  create_pool(**kwargs)

    Create pool

    Parameters

      - lb (str) – Load balancer name or ID

      - algorithm (str) – The load balancing algorithm

      - health_monitor (str) – The health monitor of this pool

      - members (list, optional) – The members for this load balancer pool

      - name (str, optional) – The user-defined name for this load balancer pool

      - protocol (str) – The pool protocol

      - session_persistence (str, optional) – The session persistence of this pool

  create_rule(**kwargs)

    Create rule

    Parameters

      - lb (str) – Load balancer name or ID

      - listener (str) – Listener port or ID

      - policy (str) – The policy name or ID

      - condition (str) – The condition of the rule

      - field (str) – HTTP header field

      - type (str) – The type of the rule

      - value (str) – Value to be matched for rule condition

  delete_lb(lb)

    Delete load balancer

    Parameters

      lb (str) – Load balancer name or ID

    Returns

      Delete status

    Return type

      dict

  delete_listener(lb, listener)

    Delete listener from load balancer

    Parameters

      - lb (str) – Load balancer name or ID

      - listener (str) – Listener port or ID

    Returns

      Delete status

    Return type

      dict

  delete_member(lb, pool, member)

    Delete member from pool

    Parameters

      - lb (str) – Load balancer name or ID

      - pool (str) – Pool name ID

      - member (str) – Member address or ID

    Returns

      Delete status

    Return type

      dict

  delete_policy(lb, listener, policy)

    Delete policy from listener

    Parameters

      - lb (str) – Load balancer name or ID

      - listener (str) – Listener port or ID

      - policy (str) – Policy name or ID

    Returns

      Delete status

    Return type

      dict

  delete_pool(lb, pool)

    Delete pool from load balancer

    Parameters

      - lb (str) – Load balancer name or ID

      - pool (str) – Pool name ID

    Returns

      Delete status

    Return type

      dict

  delete_rule(lb, listener, policy, rule)

    Delete rule from policy

    Parameters

      - lb (str) – Load balancer name or ID

      - listener (str) – Listener port or ID

      - policy (str) – Policy name or ID

      - rule (str) – Rule ID

    Returns

      Delete status

    Return type

      dict

  get_lb(lb)

    Retrieve specific load balancer

    Parameters

      lb (str) – Load balancer name or ID

    Returns

      Load balancer information

    Return type

      dict

  get_lb_by_id(id)

    Retrieve specific load balancer by ID

    Parameters

      id (str) – Load balancer ID

    Returns

      Load balancer information

    Return type

      dict

  get_lb_by_name(name)

    Retrieve specific load balancer by name

    Parameters

      name (str) – Load balancer name

    Returns

      Load balancer information

    Return type

      dict

  get_lb_listener(lb, listener)

    Retrieve specific load balancer

    Parameters

      - lb (str) – Load balancer name or ID

      - listener (str) – Listener port or ID

    Returns

      Listener information

    Return type

      dict

  get_lb_listener_by_id(lb, id)

    Retrieve specific listener from load balancer by ID

    Parameters

      - lb (str) – Load balancer name or ID

      - id (str) – Listener ID

    Returns

      Listener information

    Return type

      dict

  get_lb_listener_by_port(lb, port)

    Retrieve specific listener from load balancer by port

    Parameters

      - lb (str) – Load balancer name or ID

      - port (str) – Listener port

    Returns

      Listener information

    Return type

      dict

  get_lb_listener_policies(lb, listener)

    Retrieve policies for specific listeners

    Parameters

      - lb (str) – Load balancer name or ID

      - listener (str) – Listener port or ID

    Returns

      List of policies

    Return type

      list

  get_lb_listener_policy(lb, listener, policy)

    Retrieve specific policy from listener

    Parameters

      - lb (str) – Load balancer name or ID

      - listener (str) – Listener port or ID

      - policy (str) – Policy name or ID

    Returns

      Listerner information

    Return type

      dict

  get_lb_listener_policy_by_id(lb, listener, id)

    Retrieve specific policy from listener by ID

    Parameters

      - lb (str) – Load balancer name or ID

      - listener (str) – Listener port or ID

      - id (str) – Policy ID

    Returns

      Listerner information

    Return type

      dict

  get_lb_listener_policy_by_name(lb, listener, name)

    Retrieve specific policy from listener by name

    Parameters

      - lb (str) – Load balancer name or ID

      - listener (str) – Listener port or ID

      - name (str) – Policy name

    Returns

      Listerner information

    Return type

      dict

  get_lb_listener_policy_rule(lb, listener, policy, rule)

    Retrieve specific rule from listener’s policy

    Parameters

      - lb (str) – Load balancer name or ID

      - listener (str) – Listener port or ID

      - policy (str) – Policy name or ID

      - rule (str) – Rule ID

    Returns

      Rule information

    Return type

      dict

  get_lb_listener_policy_rules(lb, listener, policy)

    Retrieve rules from listener’s policy

    Parameters

      - lb (str) – Load balancer name or ID

      - listener (str) – Listener port or ID

      - policy (str) – Policy name or ID

    Returns

      List of rules

    Return type

      list

  get_lb_listeners(lb)

    Retrieve listeners for specific load balancer

    Parameters

      lb (str) – Load balancer name or ID

    Returns

      List of load balancer listeners

    Return type

      list

  get_lb_pool(lb, pool)

    Retrieve specific pool from load balancer

    Parameters

      - lb (str) – Load balancer name or ID

      - pool (str) – Pool name or ID

    Returns

      Pool information

    Return type

      dict

  get_lb_pool_by_id(lb, id)

    Retrieve specific pool from load balancer by ID

    Parameters

      - lb (str) – Load balancer name or ID

      - id (str) – Pool ID

    Returns

      Pool information

    Return type

      dict

  get_lb_pool_by_name(lb, name)

    Retrieve specific pool from load balancer by name

    Parameters

      - lb (str) – Load balancer name or ID

      - name (str) – Pool ID

    Returns

      Pool information

    Return type

      dict

  get_lb_pool_member(lb, pool, member)

    Retrieve specific pool from load balancer

    Parameters

      - lb (str) – Load balancer name or ID

      - pool (str) – Pool name or ID

      - member (str) – Member ID

    Returns

      Member information

    Return type

      dict

  get_lb_pool_member_by_address(lb, pool, address)

    Retrieve specific pool from load balancer by ID

    Parameters

      - lb (str) – Load balancer name or ID

      - pool (str) – Pool name or ID

      - address (str) – Member address

    Returns

      Member information

    Return type

      dict

  get_lb_pool_member_by_id(lb, pool, id)

    Retrieve specific pool from load balancer by ID

    Parameters

      - lb (str) – Load balancer name or ID

      - pool (str) – Pool name or ID

      - id (str) – Member address or ID

    Returns

      Member information

    Return type

      dict

  get_lb_pool_members(lb, pool)

    Retrieve pools from loadbalancer

    Parameters

      - lb (str) – Load balancer name or ID

      - pool (str) – Pool name or ID

    Returns

      List of members of a pool

    Return type

      list

  get_lb_pools(lb)

    Retrieve pools from loadbalancer

    Parameters

      lb (str) – Load balancer name or ID

    Returns

      List of load balancer

    Return type

      list

  get_lb_stats(lb)

    Retrieve statistics for specific load balancer

    Parameters

      lb (str) – Load balancer name or ID

    Returns

      Load balancer statistics

    Return type

      dict

  get_lbs()

    Retrieve load balancer list

    Returns

      List of load balancers

    Return type

      list

## ibmcloud_python_sdk.vpc.security module

class ibmcloud_python_sdk.vpc.security.Security

  Bases: `object`

  add_interface_security_group(**kwargs)

    Add network interface to a security group

    Parameters

      - interface (str) – The network interface ID

      - security_group (str) – The security group name or ID

      - instance (str, optional) – Instance name or ID

  create_security_group(**kwargs)

    Create security group

    Parameters

      - name (str, optional) – The user-defined name for this security group

      - resource_group – The resource group to use

      - vpc (str) – The VPC this security group is to be a part of

      - rules (list, optional) – Array of rule prototype objects for rules to be created for this security group

  create_security_group_rule(**kwargs)

    Create security group rule

    Parameters

      - sg (str) – Security group name or ID where to add the rule

      - direction (str) – The direction of traffic to enforce, either inbound or outbound

      - ip_version (str) – The IP version to enforce

      - protocol (str) – The protocol to enforce

      - port_min (int) – The inclusive lower bound of TCP/UDP port range

      - port_max (int) – The inclusive upper bound of TCP/UDP port range

      - code (int) – The ICMP traffic code to allow

      - type (str) – The ICMP traffic type to allow

      - cidr_block (str) – The CIDR block

      - address (str) – The IP address

      - security_group (str) – The unique identifier for this security group

  delete_security_group(security_group)

    Delete security group

    Parameters

      security_group (str) – Security group name or ID

    Returns

      Delete status

    Return type

      dict

  delete_security_group_rule(security_group, rule)

    Delete rule from security group

    Parameters

      security_group (str) – Security group name or ID

    Parem rule

      Rule name or ID

    Returns

      Delete status

    Return type

      dict

  get_security_group(security_group)

    Retrieve specific security group

    Parameters

      security_group (str) – Security group name or ID

    Returns

      Security group information

    Return type

      dict

  get_security_group_by_id(id)

    Retrieve specific security group by ID

    Parameters

      id (str) – Security group ID

    Returns

      Security group information

    Return type

      dict

  get_security_group_by_name(name)

    Retrieve specific security group by name

    Parameters

      name (str) – Security group name

    Returns

      Security group information

    Return type

      dict

  get_security_group_interface(security_group, interface)

    Retrieve specific network interface associated to a security group

    Parameters

      - security_group (str) – Security group name or ID

      - interface (str) – Network interface name or ID

    Returns

      Network interface information

    Return type

      dict

  get_security_group_interface_by_id(security_group, id)

    Retrieve specific network interface associated to a security group by ID

    Parameters

      - security_group (str) – Security group name or ID

      - id (str) – Network interface ID

    Returns

      Network interface information

    Return type

      dict

  get_security_group_interface_by_name(security_group, name)

    Retrieve specific network interface associated to a security group by name

    Parameters

      - security_group (str) – Security group name or ID

      - name (str) – Network interface name

    Returns

      Network interface information

    Return type

      dict

  get_security_group_interfaces(security_group)

    Retrieve network interfaces associated to a security group

    Parameters

      security_group (str) – Security group name or ID

    Returns

      List of network interfaces

    Return type

      list

  get_security_group_rule(security_group, rule)

    Retrieve specific rule from a security group

    Parameters

      - security_group (str) – Security group name or ID

      - rule (str) – Rule ID

    Returns

      Rule information

    Return type

      dict

  get_security_group_rule_by_id(security_group, id)

    Retrieve specific rule from a security group by ID

    Parameters

      - security_group (str) – Security group name or ID

      - id (str) – Rule ID

    Returns

      Rule information

    Return type

      dict

  get_security_group_rules(security_group)

    Retrieve rules from a security group

    Parameters

      security_group (str) – Security group name or ID

    Returns

      List of rules

    Return type

      list

  get_security_groups()

    Retrieve security group list

    Returns

      List of security groups

    Return type

      list

  remove_interface_security_group(security_group, interface)

    Remove network interface from a security group

    Parameters

      security_group (str) – Security group name or ID

    Parem interface

      Interface ID

    Returns

      Delete status

    Return type

      dict

## ibmcloud_python_sdk.vpc.subnet module

class ibmcloud_python_sdk.vpc.subnet.Subnet

  Bases: `object`

  attach_network_acl(**kwargs)

    Attach network ACL to a subnet

    Parameters

      - subnet (str) – Subnet name or ID

      - network_acl (str) – Network ACL name or ID

  attach_public_gateway(**kwargs)

    Attach public gateway to a subnet

    Parameters

      - subnet (str) – Subnet name or ID

      - public_gateway (str) – Public gateway name or ID

  create_subnet(**kwargs)

    Create subnet

    Parameters

      - name (str, optional) – The unique user-defined name for this subnet

      - resource_group (str, optional) – The resource group to use

      - ipv4_cidr_block (str) – The IPv4 range of the subnet, expressed in CIDR format

      - vpc (str) – The VPC the subnet is to be a part of

      - zone (str) – The zone the subnet is to reside in

      - ip_version (str, optional) – The IP version(s) supported

      - network_acl (str, optional) – The network ACL to use for this subnet

      - public_gateway (str, optional) – The public gateway to handle internet bound traffic for this subnet

      - routing_table (str, optional) – The routing table for this subnet

      - total_ipv4_address_count (int, optional) – The total number of IPv4 addresses required

  delete_subnet(subnet)

    Delete subnet

    Parameters

      subnet (str) – Subnet name or ID

    Returns

      Delete status

    Return type

      resource_deleted()

  detach_public_gateway(subnet)

    Detach public gateway from a subnet

    Parameters

      subnet (str) – Subnet name or ID

    Returns

      Detach status

    Return type

      resource_deleted()

  get_subnet(subnet)

    Retrieve specific subnet

    Parameters

      subnet (str) – Subnet name or ID

    Returns

      Subnet information

    Return type

      dict

  get_subnet_by_id(id)

    Retrieve specific subnet by ID

    Parameters

      id (str) – Subnet ID

    Returns

      Subnet information

    Return type

      dict

  get_subnet_by_name(name)

    Retrieve specific subnet by name

    Parameters

      name (str) – Subnet name

    Returns

      Subnet information

    Return type

      dict

  get_subnet_network_acl(subnet)

    Retrieve network ACL for a specific subnet

    Parameters

      subnet (str) – Subnet name or ID

    Returns

      Network ACL information

    Return type

      dict

  get_subnet_public_gateway(subnet)

    Retrieve public gateway for a specific subnet

    Parameters

      subnet (str) – Subnet name or ID

    Returns

      Public gateway information

    Return type

      dict

  get_subnets()

    Retrieve subnet list

    Returns

      List of subnets

    Return type

      list

## ibmcloud_python_sdk.vpc.volume module

class ibmcloud_python_sdk.vpc.volume.Volume

  Bases: `object`

  create_volume(**kwargs)

    Create block volume

    Parameters

      - name (str, optional) – The unique user-defined name for this volume

      - resource_group (str, optional) – The resource group to use

      - zone (str) – The location of the volume

      - iops (int, optional) – The bandwidth for the volume

      - profile (str) – The profile to use for this volume

      - capacity (int) – The capacity of the volume in gigabytes

      - encryption_key (str, optional) – The key to use for encrypting this volume

  delete_volume(volume)

    Delete volume

    Parameters

      volume (str) – Volume name or ID

    Returns

      Delete status

    Return type

      resource_deleted()

  get_volume(volume)

    Retrieve specific volume by name or by ID

    Parameters

      volume (str) – Volume name or ID

    Returns

      Volume information

    Return type

      dict

  get_volume_by_id(id)

    Retrieve specific volume by ID

    Parameters

      id (str) – Volume ID

    Returns

      Volume information

    Return type

      dict

  get_volume_by_name(name)

    Retrieve specific volume by name

    Parameters

      name (str) – Volume name

    Returns

      Volume information

    Return type

      dict

  get_volume_profile(profile)

    Retrieve specific volume profile

    Parameters

      profile (str) – Volume profile name

    Returns

      Profile information

    Return type

      dict

  get_volume_profiles()

    Retrieve volume profile list

    Returns

      List of profiles

    Return type

      list

  get_volumes()

    Retrieve volume list

    Returns

      List of volumes

    Return type

      list

## ibmcloud_python_sdk.vpc.vpc module

class ibmcloud_python_sdk.vpc.vpc.Vpc

  Bases: `object`

  create_address_prefix(**kwargs)

    Create address prefix

    Parameters

      - vpc (str) – VPC name or ID

      - name (str, optional) – The user-defined name for this address prefix

      - cidr (str) – The CIDR block for this address prefix

      - is_default (bool, optional) – Indicates whether this is the default prefix for this zone in this VPC

      - zone (str) – The zone this address prefix is to belong to

    Returns

      Address prefix information

    Return type

      dict

  create_route(**kwargs)

    Create route in VPC default routing table

    Parameters

      - vpc (str) – VPC name or ID

      - name (str, optional) – The user-defined name for this route

      - destination (str) – The destination of the route

      - next_hop (str, optional) – The next hop that packets will be delivered to

      - zone (ste) – The zone to apply the route to

    Returns

      Route list information

    Return type

      dict

  create_vpc(**kwargs)

    Create VPC (Virtual Private Cloud)

    Parameters

      - name (str, optional) – The unique user-defined name for this VPC

      - resource_group (str, optional) – The resource group to use

      - address_prefix_management (str, optional) – Indicates whether a default address prefix should be automatically created for each zone in this VPC

      - classic_access (bool, optional) – Indicates whether this VPC should be connected to Classic Infrastructure, defaults to False

  delete_address_prefix(vpc, prefix)

    Delete address prefix

    Parameters

      - vpc (str) – VPC name or ID

      - prefix (str) – Address prefix name or ID

    Returns

      Delete status

    Return type

      dict

  delete_route(vpc, route)

    Delete route from VPC default routing table

    Parameters

      - vpc (str) – VPC name or ID

      - table (str) – Routing table name or ID

    Returns

      Delete status

    Return type

      dict

  delete_vpc(vpc)

    Delete VPC

    Parameters

      vpc (str) – VPC name or ID

    Returns

      Delete status

    Return type

      resource_deleted()

  get_address_prefix(vpc, prefix)

    Retrieve specific VPC address prefix by name or by ID

    Parameters

      - vpc (str) – VPC name or ID

      - prefix (str) – Address prefix name or ID

    Returns

      Address prefix information

    Return type

      dict

  get_address_prefix_by_cidr(vpc, cidr)

    Retrieve specific VPC address prefix by cidr

    Parameters

      - vpc (str) – VPC name or ID

      - cidr (str) – Address prefix CIDR

    Returns

      Address prefix information

    Return type

      dict

  get_address_prefix_by_id(vpc, id)

    Retrieve specific VPC address prefix by ID

    Parameters

      - vpc (str) – VPC name or ID

      - id (str) – Address prefix ID

    Returns

      Address prefix information

    Return type

      dict

  get_address_prefix_by_name(vpc, name)

    Retrieve specific VPC address prefix by name

    Parameters

      - vpc (str) – VPC name or ID

      - name (str) – Address prefix name

    Returns

      Address prefix information

    Return type

      dict

  get_address_prefixes(vpc)

    Retrieve VPC address pool prefix list

    Parameters

      vpc (str) – VPC name or ID

    Returns

      List of adress prefixes

    Return type

      list

  get_default_network_acl(vpc)

    Retrieve VPC’s default network ACL

    Parameters

      vpc (str) – VPC name or ID

    Returns

      Default network information

    Return type

      dict

  get_default_security_group(vpc)

    Retrieve VPC’s default security group

    Parameters

      vpc (str) – VPC name or ID

    Returns

      Default security group information

    Return type

      dict

  get_route(vpc, route)

    Retrieve specific route from VPC default routing table by name or by ID

    Parameters

      - vpc (str) – VPC name or ID

      - table (str) – Routing table name or ID

    Returns

      Routing table information

    Return type

      dict

  get_route_by_id(vpc, id)

    Retrieve specific route from VPC default routing table by ID

    Parameters

      - vpc (str) – VPC name or ID

      - id (str) – Routing table ID

    Returns

      Routing table information

    Return type

      dict

  get_route_by_name(vpc, name)

    Retrieve specific route from VPC default routing table by name

    Parameters

      - vpc (str) – VPC name or ID

      - name (str) – Routing table name

    Returns

      Routing table information

    Return type

      dict

  get_routes(vpc)

    Retrieve route list from VPC default routing table

    Parameters

      vpc (str) – VPC name or ID

    Returns

      List of routing tables

    Return type

      dict

  get_vpc(vpc)

    Retrieve specific VPC by name or by ID

    Parameters

      vpc (str) – VPC name or ID

    Returns

      VPC information

    Return type

      dict

  get_vpc_by_id(id)

    Retrieve specific VPC by ID

    Parameters

      id (str) – VPC ID

    Returns

      VPC information

    Return type

      dict

  get_vpc_by_name(name)

    Retrieve specific VPC by name

    Parameters

      name (str) – VPC name

    Returns

      VPC information

    Return type

      dict

  get_vpcs()

    Retrieve VPC list

    Returns

      List of VPCs

    Return type

      list

## ibmcloud_python_sdk.vpc.vpn module

class ibmcloud_python_sdk.vpc.vpn.Vpn

  Bases: `object`

  add_local_cidr_connection(**kwargs)

    Add local CIDR to a connection

    Parameters

      - gateway (str) – The VPN gateway name or ID

      - connection (str) – The connection name or ID

      - prefix_address (str) – The prefix address part of the CIDR

      - prefix_length (int) – The prefix length part of the CIDR

  add_peer_cidr_connection(**kwargs)

    Add peer CIDR to a connection

    Parameters

      - gateway (str) – The VPN gateway name or ID

      - connection (str) – The connection name or ID

      - prefix_address (str) – The prefix address part of the CIDR

      - prefix_length (int) – The prefix length part of the CIDR

  check_vpn_gateway_local_cidr(gateway, connection, prefix_address, prefix_length)

    Check if local CIDR exists on specific connection for a VPN gateway

    Parameters

      - gateway (str) – VPN gateway name

      - connection (str) – Connection name or ID

      - prefix_address (str) – The prefix address part of the CIDR

      - prefix_length (int) – The prefix length part of the CIDR

    Returns

      Local CIDR information

    Return type

      dict

  check_vpn_gateway_peer_cidr(gateway, connection, prefix_address, prefix_length)

    Check if local CIDR exists on specific connection for a VPN gateway

    Parameters

      - gateway (str) – VPN gateway name

      - connection (str) – Connection name or ID

      - prefix_address (str) – The prefix address part of the CIDR

      - prefix_length (int) – The prefix length part of the CIDR

    Returns

      Peer CIDR information

    Return type

      dict

  create_connection(**kwargs)

    Create connection

    Parameters

      - gateway (str) – The VPN gateway name or ID

      - name (str, gateway) – The user-defined name for this connection

      - peer_address (str) – The IP address of the peer VPN gateway

      - local_cidrs (list, optional) – A collection of local CIDRs

      - peer_cidrs (list, optional) – A collection of peer CIDRs

      - psk (str) – The preshared key

      - admin_state_up (bool, optional) – VPN connection shutdown if false, defaults to True

      - interval (int, optional) – Dead Peer Detection interval in seconds

      - timeout (int, optional) – Dead Peer Detection timeout in seconds

      - action (str, optional) – Dead Peer Detection actions

      - encryption_algorithm (str, optional) – The encryption algorithm

      - key_lifetime (int, optional) – The key lifetime in seconds

      - ike_policy (str, optional) – The absence of a policy indicates autonegotiation

      - ipsec_policy (str, optional) – The absence of a policy indicates autonegotiation

  create_gateway(**kwargs)

    Create gateway

    Parameters

      - name (str, optional) – The user-defined name for this gateway

      - resource_group (str, optional) – The resource group to use

      - subnet (str) – Identifies a subnet by a unique property

  create_ike_policy(**kwargs)

    Create IKE policy

    Parameters

      - name (str, optional) – The user-defined name for this IKE policy

      - resource_group (str, optional) – The resource group to use

      - authentication_algorithm (str) – The authentication algorithm

      - dh_group (str) – The Diffie-Hellman group

      - encryption_algorithm (str) – The encryption algorithm

      - ike_version (int) – The IKE protocol version

      - key_lifetime (int, optional) – The key lifetime in seconds

  create_ipsec_policy(**kwargs)

    Create IPsec policy

    Parameters

      - name (str, optional) – The user-defined name for this IPsec policy

      - resource_group (str, optional) – The resource group to use

      - authentication_algorithm (str) – The authentication algorithm

      - pfs (str) – Perfect Forward Secrecy

      - encryption_algorithm (str) – The encryption algorithm

      - key_lifetime (int, optional) – The key lifetime in seconds

  delete_connection(gateway, connection)

    Delete connection

    Parameters

      - gateway (str) – VPN gateway name or ID

      - connection (str) – Connection name or ID

    Returns

      Delete status

    Return type

      dict

  delete_gateway(gateway)

    Delete VPN gateway

    Parameters

      gateway (str) – VPN gateway name or ID

    Returns

      Delete status

    Return type

      dict

  delete_ike_policy(policy)

    Delete IKE policy

    Parameters

      policy (str) – IKE policy name or ID

    Returns

      Delete status

    Return type

      dict

  delete_ipsec_policy(policy)

    Delete IPsec policy

    Parameters

      policy (str) – IPsec policy name or ID

    Returns

      Delete status

    Return type

      dict

  get_ike_policies()

    Retrieve IKE policy list

    Returns

      List of IKE policies

    Return type

      list

  get_ike_policy(policy)

    Retrieve specific IKE policy

    Parameters

      policy (str) – Policy name or ID

    Returns

      IKE policy information

    Return type

      dict

  get_ike_policy_by_id(id)

    Retrieve specific IKE policy by ID

    Parameters

      id (str) – IKE policy ID

    Returns

      IKE policy information

    Return type

      dict

  get_ike_policy_by_name(name)

    Retrieve specific IKE policy by name

    Parameters

      name (str) – IKE policy name

    Returns

      IKE policy information

    Return type

      dict

  get_ike_policy_connections(policy)

    Retrieve connections for an IKE policy

    Parameters

      policy (str) – IKE policy name or ID

    Returns

      Connections information

    Return type

      dict

  get_ipsec_policies()

    Retrieve IPsec policy list

    Returns

      List of IPSec policies

    Return type

      list

  get_ipsec_policy(policy)

    Retrieve specific IPsec policy

    Parameters

      policy (str) – Policy name or ID

    Returns

      IPSec policy information

    Return type

      dict

  get_ipsec_policy_by_id(id)

    Retrieve specific IPsec policy by ID

    Parameters

      id (str) – IPsec policy ID

    Returns

      IPSec policy information

    Return type

      dict

  get_ipsec_policy_by_name(name)

    Retrieve specific IPsec policy by name

    Parameters

      name (str) – IPsec policy name

    Returns

      IPSec policy information

    Return type

      dict

  get_ipsec_policy_connections(policy)

    Retrieve connections for an IPsec policy

    Parameters

      policy (str) – IPsec policy name or ID

    Returns

      Connections information

    Return type

      dict

  get_vpn_gateway(gateway)

    Retrieve specific VPN gateway

    Parameters

      gateway (str) – VPN gateway name or ID

    Returns

      Gateway information

    Return type

      dict

  get_vpn_gateway_by_id(id)

    Retrieve specific VPN gateway by ID

    Parameters

      id (str) – VPN gateway ID

    Returns

      Gateway information

    Return type

      dict

  get_vpn_gateway_by_name(name)

    Retrieve specific VPN gateway by name

    Parameters

      name (str) – VPN gateway name

    Returns

      Gateway information

    Return type

      dict

  get_vpn_gateway_connection(gateway, connection)

    Retrieve specific connection for a VPN gateway

    Parameters

      - gateway (str) – VPN gateway name or ID

      - connection (str) – Connection name or ID

    Returns

      Connection information

    Return type

      dict

  get_vpn_gateway_connection_by_id(gateway, id)

    Retrieve specific connection for a VPN gateway by ID

    Parameters

      - gateway (str) – VPN gateway name or ID

      - id (str) – Connecton ID

    Returns

      Connection information

    Return type

      dict

  get_vpn_gateway_connection_by_name(gateway, name)

    Retrieve specific connection for a VPN gateway by name

    Parameters

      - gateway (str) – VPN gateway name

      - name (str) – Connection name

    Returns

      Connection information

    Return type

      dict

  get_vpn_gateway_connections(gateway)

    Retrieve connections for a VPN gateway

    Parameters

      gateway (str) – VPN gateway name or ID

    Returns

      List of connections

    Return type

      list

  get_vpn_gateway_local_cidrs(gateway, connection)

    Retrieve local CIDR list on specific connection for a VPN gateway

    Parameters

      - gateway (str) – VPN gateway name

      - connection (str) – Connection name or ID

    Returns

      List of local CIDRs

    Return type

      list

  get_vpn_gateway_peer_cidrs(gateway, connection)

    Retrieve peer CIDR list on specific connection for a VPN gateway

    Parameters

      - gateway (str) – VPN gateway name

      - connection (str) – Connection name or ID

    Returns

      List of peer CIDRs

    Return type

      list

  get_vpn_gateways()

    Retrieve VPN gateway list

    Returns

      List of gateways

    Return type

      list

  remove_local_cidr(gateway, connection, prefix_address, prefix_length)

    Remove local CIDR from a connection

    Parameters

      - gateway (str) – VPN gateway name or ID

      - connection (str) – Connection name or ID

      - prefix_address (str) – The prefix address part of the CIDR

      - prefix_length (int) – The prefix length part of the CIDR

    Returns

      Delete status

    Return type

      dict

  remove_peer_cidr(gateway, connection, prefix_address, prefix_length)

    Remove peer CIDR from a connection

    Parameters

      - gateway (str) – VPN gateway name or ID

      - connection (str) – Connection name or ID

      - prefix_address (str) – The prefix address part of the CIDR

      - prefix_length (int) – The prefix length part of the CIDR

    Returns

      Delete status

    Return type

      dict

## Module contents