The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Webservice::OVH::Cloud::Project::Network::Private

SYNOPSIS

    use Webservice::OVH;
    
    my $ovh = Webservice::OVH->new_from_json("credentials.json");
    
    my $projects = $ovh->cloud->projects;
    my $example_project = $projects->[0];
    
    my $networks = $example_project->network->privates;
    
    foreach my $network (@$networks) {
        
        print $network->name;
    }

DESCRIPTION

Gives access Private Network methods.

METHODS

_new_existing

Internal Method to create the Private object. This method is not ment to be called directly.

_new_existing

Internal Method to create the Private object. This method is not ment to be called directly.

project

Root Project.

is_valid

When this object is deleted on the api side, this method returns 0.

  • Return: VALUE

  • Synopsis: print "Valid" if $private_network->is_valid;

_is_valid

Intern method to check validity. Difference is that this method carps an error.

  • Return: VALUE

  • Synopsis: $private_network->_is_valid;

id

Returns the api id

  • Return: VALUE

  • Synopsis: my $id = $private_network->id;

properties

Returns the raw properties as a hash. This is the original return value of the web-api.

  • Return: HASH

  • Synopsis: my $properties = $private_network->properties;

regions

Exposed property value.

  • Return: ARRAY

  • Synopsis: my $regions = $private_network->regions;

status

Exposed property value.

  • Return: VALUE

  • Synopsis: my $status = $private_network->status;

name

Exposed property value.

  • Return: VALUE

  • Synopsis: my $name = $private_network->name;

type

Exposed property value.

  • Return: VALUE

  • Synopsis: my $type = $private_network->type;

vlan_id

Exposed property value.

  • Return: VALUE

  • Synopsis: my $vlan_id = $private_network->vlan_id;

change

Changes the private network.

  • Parameter: $name - name to be changed

  • Synopsis: $private_network->change(name => 'Test network');

delete

Deletes the object api sided and sets it invalid.

  • Synopsis: $private_network->delete;

region

Activate private network in a new region

  • Parameter: $region - region name in which the network should be activated

  • Synopsis: $private_network->region('GRA1');

subnets

Produces an array of all available subnets.

  • Return: ARRAY

  • Synopsis: my $subnets = $private_network->subnets;

subnet

Returns a single subnet by id

create_subnet

Create a new network subnet.

  • Parameter: %params - key => value (required) dhcp no_gateway end network region start

  • Return: <Webservice::OVH::Cloud::Project::Network::Private::Subnet>

  • Synopsis: my $subnet = $project->create_subnet( dhcp => 1, no_gateway => 1, end => "192.168.1.24", start => "192.168.1.12", network => "192.168.1.0/24", region => "GRA1" );