ibmcloud_python_sdk.vpc package¶
Submodules¶
ibmcloud_python_sdk.vpc.acl module¶
- class ibmcloud_python_sdk.vpc.acl.Acl[source]¶
- Bases: - object- create_network_acl(**kwargs)[source]¶
- 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)[source]¶
- 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)[source]¶
- Delete network ACL - Parameters
- acl (str) – Network ACL name or ID 
- Returns
- Delete status 
- Return type
- dict 
 
 - delete_network_acl_rule(acl, rule)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- Retrieve rules for a specific network ACL by ID - Parameters
- id (str) – Network ACL ID 
- Returns
- Network ACL rules list 
- Return type
- dict 
 
 
ibmcloud_python_sdk.vpc.floating_ip module¶
- class ibmcloud_python_sdk.vpc.floating_ip.Fip[source]¶
- Bases: - object- get_floating_ip(fip)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- Retrieve specific floating IP by name - Parameters
- name (str) – Floating IP name 
- Returns
- Floating IP information 
- Return type
- dict 
 
 - release_floating_ip(fip)[source]¶
- Release floating IP - Parameters
- fip (str) – Floating IP name, ID or address 
 
 - reserve_floating_ip(**kwargs)[source]¶
- 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[source]¶
- Bases: - object- create_public_gateway(**kwargs)[source]¶
- 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)[source]¶
- Delete public gateway - Parameters
- gateway (str) – Public gateway name or ID 
- Returns
- Delete status 
- Return type
- dict 
 
 - get_public_gateway(gateway)[source]¶
- 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)[source]¶
- Retrieve specific public gateway by ID - Parameters
- id (str) – Public gateway ID 
- Returns
- Public gateway information 
- Return type
- dict 
 
 
ibmcloud_python_sdk.vpc.geo module¶
- class ibmcloud_python_sdk.vpc.geo.Geo[source]¶
- Bases: - object- get_region(region)[source]¶
- Retrieve specific region - Parameters
- region (str) – Region name 
- Returns
- Region information 
- Return type
- dict 
 
 - get_region_zone(region, zone)[source]¶
- Retrieve specific zone for a specific region - Parameters
- region (str) – Region name 
- zone (str) – Zone name 
 
- Returns
- Zone information 
- Return type
- dict 
 
 
ibmcloud_python_sdk.vpc.image module¶
- class ibmcloud_python_sdk.vpc.image.Image[source]¶
- Bases: - object- create_image(**kwargs)[source]¶
- 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)[source]¶
- Delete image - Parameters
- image (str) – Image name or ID 
- Returns
- Delete status 
- Return type
- dict 
 
 - get_image(image)[source]¶
- Retrieve specific image - Parameters
- image (str) – Image name or ID 
- Returns
- Image information 
- Return type
- dict 
 
 - get_image_by_id(id)[source]¶
- Retrieve specific image by ID - Parameters
- id (str) – Image ID 
- Returns
- Image information 
- Return type
- dict 
 
 - get_image_by_name(name)[source]¶
- Retrieve specific image by name - Parameters
- name (str) – Image name 
- Returns
- Image information 
- Return type
- dict 
 
 
ibmcloud_python_sdk.vpc.instance module¶
- class ibmcloud_python_sdk.vpc.instance.Instance[source]¶
- Bases: - object- associate_floating_ip(**kwargs)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- Delete instance - Parameters
- instance (str) – Instance name or ID 
- Returns
- Delete status 
- Return type
- dict 
 
 - delete_instance_interface(instance, interface)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- Retrieve specific instance - Parameters
- instance (str) – Instance name or ID 
- Returns
- Instance information 
- Return type
- dict 
 
 - get_instance_by_id(id)[source]¶
- Retrieve specific instance by ID - Parameters
- id (str) – Instance ID 
- Returns
- Instance information 
- Return type
- dict 
 
 - get_instance_by_name(name)[source]¶
- Retrieve specific instance by name - Parameters
- name (str) – Instance name 
- Returns
- Instance information 
- Return type
- dict 
 
 - get_instance_configuration(instance)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- Retrieve specific instance profile - Parameters
- profile (str) – Instance profile name or ID 
- Returns
- Profile information 
- Return type
- dict 
 
 - get_instance_profiles()[source]¶
- Retrieve instance profile list - Returns
- List of instance profiles: 
- Return type
- list 
 
 - get_instance_volume_attachment(instance, attachment)[source]¶
- 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 
 
 
ibmcloud_python_sdk.vpc.key module¶
- class ibmcloud_python_sdk.vpc.key.Key[source]¶
- Bases: - object- create_key(**kwargs)[source]¶
- 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)[source]¶
- Delete key - Parameters
- key (str) – Key name or ID 
- Returns
- Delete status 
- Return type
- dict 
 
 - get_key(key)[source]¶
- Retrieve specific key - Parameters
- key (str) – Key name or ID 
- Returns
- Key information 
- Return type
- dict 
 
 - get_key_by_id(id)[source]¶
- Retrieve specific key by ID - Parameters
- id (str) – Key ID 
- Returns
- Key information 
- Return type
- dict 
 
 
ibmcloud_python_sdk.vpc.loadbalancer module¶
- class ibmcloud_python_sdk.vpc.loadbalancer.Loadbalancer[source]¶
- Bases: - object- create_lb(**kwargs)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- Delete load balancer - Parameters
- lb (str) – Load balancer name or ID 
- Returns
- Delete status 
- Return type
- dict 
 
 - delete_listener(lb, listener)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- Retrieve specific load balancer - Parameters
- lb (str) – Load balancer name or ID 
- Returns
- Load balancer information 
- Return type
- dict 
 
 - get_lb_by_id(id)[source]¶
- Retrieve specific load balancer by ID - Parameters
- id (str) – Load balancer ID 
- Returns
- Load balancer information 
- Return type
- dict 
 
 - get_lb_by_name(name)[source]¶
- Retrieve specific load balancer by name - Parameters
- name (str) – Load balancer name 
- Returns
- Load balancer information 
- Return type
- dict 
 
 - get_lb_listener(lb, listener)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- Retrieve pools from loadbalancer - Parameters
- lb (str) – Load balancer name or ID 
- Returns
- List of load balancer 
- Return type
- list 
 
 
ibmcloud_python_sdk.vpc.security module¶
- class ibmcloud_python_sdk.vpc.security.Security[source]¶
- Bases: - object- add_interface_security_group(**kwargs)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- Retrieve rules from a security group - Parameters
- security_group (str) – Security group name or ID 
- Returns
- List of rules 
- Return type
- list 
 
 
ibmcloud_python_sdk.vpc.subnet module¶
- class ibmcloud_python_sdk.vpc.subnet.Subnet[source]¶
- Bases: - object- attach_network_acl(**kwargs)[source]¶
- 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)[source]¶
- Attach public gateway to a subnet - Parameters
- subnet (str) – Subnet name or ID 
- public_gateway (str) – Public gateway name or ID 
 
 
 - create_subnet(**kwargs)[source]¶
- 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)[source]¶
- Delete subnet - Parameters
- subnet (str) – Subnet name or ID 
- Returns
- Delete status 
- Return type
- resource_deleted() 
 
 - detach_public_gateway(subnet)[source]¶
- Detach public gateway from a subnet - Parameters
- subnet (str) – Subnet name or ID 
- Returns
- Detach status 
- Return type
- resource_deleted() 
 
 - get_subnet(subnet)[source]¶
- Retrieve specific subnet - Parameters
- subnet (str) – Subnet name or ID 
- Returns
- Subnet information 
- Return type
- dict 
 
 - get_subnet_by_id(id)[source]¶
- Retrieve specific subnet by ID - Parameters
- id (str) – Subnet ID 
- Returns
- Subnet information 
- Return type
- dict 
 
 - get_subnet_by_name(name)[source]¶
- Retrieve specific subnet by name - Parameters
- name (str) – Subnet name 
- Returns
- Subnet information 
- Return type
- dict 
 
 - get_subnet_network_acl(subnet)[source]¶
- Retrieve network ACL for a specific subnet - Parameters
- subnet (str) – Subnet name or ID 
- Returns
- Network ACL information 
- Return type
- dict 
 
 
ibmcloud_python_sdk.vpc.volume module¶
- class ibmcloud_python_sdk.vpc.volume.Volume[source]¶
- Bases: - object- create_volume(**kwargs)[source]¶
- 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)[source]¶
- Delete volume - Parameters
- volume (str) – Volume name or ID 
- Returns
- Delete status 
- Return type
- resource_deleted() 
 
 - get_volume(volume)[source]¶
- 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)[source]¶
- Retrieve specific volume by ID - Parameters
- id (str) – Volume ID 
- Returns
- Volume information 
- Return type
- dict 
 
 - get_volume_by_name(name)[source]¶
- Retrieve specific volume by name - Parameters
- name (str) – Volume name 
- Returns
- Volume information 
- Return type
- dict 
 
 - get_volume_profile(profile)[source]¶
- Retrieve specific volume profile - Parameters
- profile (str) – Volume profile name 
- Returns
- Profile information 
- Return type
- dict 
 
 
ibmcloud_python_sdk.vpc.vpc module¶
- class ibmcloud_python_sdk.vpc.vpc.Vpc[source]¶
- Bases: - object- create_address_prefix(**kwargs)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- Delete VPC - Parameters
- vpc (str) – VPC name or ID 
- Returns
- Delete status 
- Return type
- resource_deleted() 
 
 - get_address_prefix(vpc, prefix)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- Retrieve specific VPC by ID - Parameters
- id (str) – VPC ID 
- Returns
- VPC information 
- Return type
- dict 
 
 
ibmcloud_python_sdk.vpc.vpn module¶
- class ibmcloud_python_sdk.vpc.vpn.Vpn[source]¶
- Bases: - object- add_local_cidr_connection(**kwargs)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- Delete VPN gateway - Parameters
- gateway (str) – VPN gateway name or ID 
- Returns
- Delete status 
- Return type
- dict 
 
 - delete_ike_policy(policy)[source]¶
- Delete IKE policy - Parameters
- policy (str) – IKE policy name or ID 
- Returns
- Delete status 
- Return type
- dict 
 
 - delete_ipsec_policy(policy)[source]¶
- Delete IPsec policy - Parameters
- policy (str) – IPsec policy name or ID 
- Returns
- Delete status 
- Return type
- dict 
 
 - get_ike_policy(policy)[source]¶
- Retrieve specific IKE policy - Parameters
- policy (str) – Policy name or ID 
- Returns
- IKE policy information 
- Return type
- dict 
 
 - get_ike_policy_by_id(id)[source]¶
- 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)[source]¶
- Retrieve specific IKE policy by name - Parameters
- name (str) – IKE policy name 
- Returns
- IKE policy information 
- Return type
- dict 
 
 - get_ike_policy_connections(policy)[source]¶
- Retrieve connections for an IKE policy - Parameters
- policy (str) – IKE policy name or ID 
- Returns
- Connections information 
- Return type
- dict 
 
 - get_ipsec_policies()[source]¶
- Retrieve IPsec policy list - Returns
- List of IPSec policies 
- Return type
- list 
 
 - get_ipsec_policy(policy)[source]¶
- Retrieve specific IPsec policy - Parameters
- policy (str) – Policy name or ID 
- Returns
- IPSec policy information 
- Return type
- dict 
 
 - get_ipsec_policy_by_id(id)[source]¶
- 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)[source]¶
- Retrieve specific IPsec policy by name - Parameters
- name (str) – IPsec policy name 
- Returns
- IPSec policy information 
- Return type
- dict 
 
 - get_ipsec_policy_connections(policy)[source]¶
- Retrieve connections for an IPsec policy - Parameters
- policy (str) – IPsec policy name or ID 
- Returns
- Connections information 
- Return type
- dict 
 
 - get_vpn_gateway(gateway)[source]¶
- Retrieve specific VPN gateway - Parameters
- gateway (str) – VPN gateway name or ID 
- Returns
- Gateway information 
- Return type
- dict 
 
 - get_vpn_gateway_by_id(id)[source]¶
- Retrieve specific VPN gateway by ID - Parameters
- id (str) – VPN gateway ID 
- Returns
- Gateway information 
- Return type
- dict 
 
 - get_vpn_gateway_by_name(name)[source]¶
- Retrieve specific VPN gateway by name - Parameters
- name (str) – VPN gateway name 
- Returns
- Gateway information 
- Return type
- dict 
 
 - get_vpn_gateway_connection(gateway, connection)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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)[source]¶
- 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 
 
 - remove_local_cidr(gateway, connection, prefix_address, prefix_length)[source]¶
- 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)[source]¶
- 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