INSTRUCTION
stringlengths
1
8.43k
RESPONSE
stringlengths
75
104k
Stop a node
def stop(name, call=None): ''' Stop a node ''' if call != 'action': raise SaltCloudSystemExit( 'The stop action must be called with -a or --action.' ) log.info('Stopping node %s', name) instance_id = _get_node(name)['instanceId'] __utils__['cloud.fire_event']( ...
Set tags for a resource. Normally a VM name or instance_id is passed in but a resource_id may be passed instead. If both are passed in the instance_id will be used.
def set_tags(name=None, tags=None, call=None, location=None, instance_id=None, resource_id=None, kwargs=None): # pylint: disable=W0613 ''' Set tags for a resource. Normally a VM name or instance_id is passed in, but a resource_id...
Retrieve tags for a resource. Normally a VM name or instance_id is passed in but a resource_id may be passed instead. If both are passed in the instance_id will be used.
def get_tags(name=None, instance_id=None, call=None, location=None, kwargs=None, resource_id=None): # pylint: disable=W0613 ''' Retrieve tags for a resource. Normally a VM name or instance_id is passed in, but a resource_id may be passed inst...
Delete tags for a resource. Normally a VM name or instance_id is passed in but a resource_id may be passed instead. If both are passed in the instance_id will be used.
def del_tags(name=None, kwargs=None, call=None, instance_id=None, resource_id=None): # pylint: disable=W0613 ''' Delete tags for a resource. Normally a VM name or instance_id is passed in, but a resource_id may be passed instead. If both are passed in, th...
Properly rename a node. Pass in the new name as new name.
def rename(name, kwargs, call=None): ''' Properly rename a node. Pass in the new name as "new name". CLI Example: .. code-block:: bash salt-cloud -a rename mymachine newname=yourmachine ''' if call != 'action': raise SaltCloudSystemExit( 'The rename action must be ...
Destroy a node. Will check termination protection and warn if enabled.
def destroy(name, call=None): ''' Destroy a node. Will check termination protection and warn if enabled. CLI Example: .. code-block:: bash salt-cloud --destroy mymachine ''' if call == 'function': raise SaltCloudSystemExit( 'The destroy action must be called with -...
Reboot a node.
def reboot(name, call=None): ''' Reboot a node. CLI Example: .. code-block:: bash salt-cloud -a reboot mymachine ''' instance_id = _get_node(name)['instanceId'] params = {'Action': 'RebootInstances', 'InstanceId.1': instance_id} result = aws.query(params, ...
Show the details from EC2 concerning an AMI
def show_image(kwargs, call=None): ''' Show the details from EC2 concerning an AMI ''' if call != 'function': raise SaltCloudSystemExit( 'The show_image action must be called with -f or --function.' ) params = {'ImageId.1': kwargs['image'], 'Action': 'Descr...
Show the details from EC2 concerning an AMI.
def show_instance(name=None, instance_id=None, call=None, kwargs=None): ''' Show the details from EC2 concerning an AMI. Can be called as an action (which requires a name): .. code-block:: bash salt-cloud -a show_instance myinstance ...or as a function (which requires either a name or in...
Given an instance query return a dict of all instance data
def _extract_instance_info(instances): ''' Given an instance query, return a dict of all instance data ''' ret = {} for instance in instances: # items could be type dict or list (for stopped EC2 instances) if isinstance(instance['instancesSet']['item'], list): for item in...
Return a list of the VMs that in this location
def _list_nodes_full(location=None): ''' Return a list of the VMs that in this location ''' provider = __active_provider_name__ or 'ec2' if ':' in provider: comps = provider.split(':') provider = comps[0] params = {'Action': 'DescribeInstances'} instances = aws.query(params,...
Return a list of the VMs that are on the provider. Only a list of VM names and their state is returned. This is the minimum amount of information needed to check for existing VMs.
def list_nodes_min(location=None, call=None): ''' Return a list of the VMs that are on the provider. Only a list of VM names, and their state, is returned. This is the minimum amount of information needed to check for existing VMs. ''' if call == 'action': raise SaltCloudSystemExit( ...
Return a list of the VMs that are on the provider with select fields
def list_nodes_select(call=None): ''' Return a list of the VMs that are on the provider, with select fields ''' return salt.utils.cloud.list_nodes_select( list_nodes_full(get_location()), __opts__['query.selection'], call, )
Show the details from EC2 concerning an instance s termination protection state
def show_term_protect(name=None, instance_id=None, call=None, quiet=False): ''' Show the details from EC2 concerning an instance's termination protection state ''' if call != 'action': raise SaltCloudSystemExit( 'The show_term_protect action must be called with -a or --action.' ...
Show the details from EC2 regarding cloudwatch detailed monitoring.
def show_detailed_monitoring(name=None, instance_id=None, call=None, quiet=False): ''' Show the details from EC2 regarding cloudwatch detailed monitoring. ''' if call != 'action': raise SaltCloudSystemExit( 'The show_detailed_monitoring action must be called with -a or --action.' ...
Enable or Disable termination protection on a node
def _toggle_term_protect(name, value): ''' Enable or Disable termination protection on a node ''' instance_id = _get_node(name)['instanceId'] params = {'Action': 'ModifyInstanceAttribute', 'InstanceId': instance_id, 'DisableApiTermination.Value': value} result = aws...
Enable/ disable detailed monitoring on a node
def disable_detailed_monitoring(name, call=None): ''' Enable/disable detailed monitoring on a node CLI Example: ''' if call != 'action': raise SaltCloudSystemExit( 'The enable_term_protect action must be called with ' '-a or --action.' ) instance_id = _g...
Do not delete all/ specified EBS volumes upon instance termination
def show_delvol_on_destroy(name, kwargs=None, call=None): ''' Do not delete all/specified EBS volumes upon instance termination CLI Example: .. code-block:: bash salt-cloud -a show_delvol_on_destroy mymachine ''' if call != 'action': raise SaltCloudSystemExit( 'Th...
Do not delete all/ specified EBS volumes upon instance termination
def keepvol_on_destroy(name, kwargs=None, call=None): ''' Do not delete all/specified EBS volumes upon instance termination CLI Example: .. code-block:: bash salt-cloud -a keepvol_on_destroy mymachine ''' if call != 'action': raise SaltCloudSystemExit( 'The keepvol...
Create an ami from a snapshot
def register_image(kwargs=None, call=None): ''' Create an ami from a snapshot CLI Example: .. code-block:: bash salt-cloud -f register_image my-ec2-config ami_name=my_ami description="my description" root_device_name=/dev/xvda snapshot_id=snap-xxxxxxxx ''' if call != ...
Create a volume.
def create_volume(kwargs=None, call=None, wait_to_finish=False): ''' Create a volume. zone The availability zone used to create the volume. Required. String. size The size of the volume, in GiBs. Defaults to ``10``. Integer. snapshot The snapshot-id from which to create th...
Attach a volume to an instance
def attach_volume(name=None, kwargs=None, instance_id=None, call=None): ''' Attach a volume to an instance ''' if call != 'action': raise SaltCloudSystemExit( 'The attach_volume action must be called with -a or --action.' ) if not kwargs: kwargs = {} if 'ins...
Describe a volume ( or volumes )
def describe_volumes(kwargs=None, call=None): ''' Describe a volume (or volumes) volume_id One or more volume IDs. Multiple IDs must be separated by ",". TODO: Add all of the filters. ''' if call != 'function': log.error( 'The describe_volumes function must be calle...
Create an SSH keypair
def create_keypair(kwargs=None, call=None): ''' Create an SSH keypair ''' if call != 'function': log.error( 'The create_keypair function must be called with -f or --function.' ) return False if not kwargs: kwargs = {} if 'keyname' not in kwargs: ...
Import an SSH public key.
def import_keypair(kwargs=None, call=None): ''' Import an SSH public key. .. versionadded:: 2015.8.3 ''' if call != 'function': log.error( 'The import_keypair function must be called with -f or --function.' ) return False if not kwargs: kwargs = {} ...
Delete an SSH keypair
def delete_keypair(kwargs=None, call=None): ''' Delete an SSH keypair ''' if call != 'function': log.error( 'The delete_keypair function must be called with -f or --function.' ) return False if not kwargs: kwargs = {} if 'keyname' not in kwargs: ...
Create a snapshot.
def create_snapshot(kwargs=None, call=None, wait_to_finish=False): ''' Create a snapshot. volume_id The ID of the Volume from which to create a snapshot. description The optional description of the snapshot. CLI Exampe: .. code-block:: bash salt-cloud -f create_snaps...
Copy a snapshot
def copy_snapshot(kwargs=None, call=None): ''' Copy a snapshot ''' if call != 'function': log.error( 'The copy_snapshot function must be called with -f or --function.' ) return False if 'source_region' not in kwargs: log.error('A source_region must be spe...
Describe a snapshot ( or snapshots )
def describe_snapshots(kwargs=None, call=None): ''' Describe a snapshot (or snapshots) snapshot_id One or more snapshot IDs. Multiple IDs must be separated by ",". owner Return the snapshots owned by the specified owner. Valid values include: self, amazon, <AWS Account ID>. Mul...
Show the console output from the instance.
def get_console_output( name=None, location=None, instance_id=None, call=None, kwargs=None, ): ''' Show the console output from the instance. By default, returns decoded data, not the Base64-encoded data that is actually returned from the EC2 API. ''' ...
Return password data for a Windows instance.
def get_password_data( name=None, kwargs=None, instance_id=None, call=None, ): ''' Return password data for a Windows instance. By default only the encrypted password data will be returned. However, if a key_file is passed in, then a decrypted password will also be r...
Download most recent pricing information from AWS and convert to a local JSON file.
def update_pricing(kwargs=None, call=None): ''' Download most recent pricing information from AWS and convert to a local JSON file. CLI Examples: .. code-block:: bash salt-cloud -f update_pricing my-ec2-config salt-cloud -f update_pricing my-ec2-config type=linux .. versionad...
Download and parse an individual pricing file from AWS
def _parse_pricing(url, name): ''' Download and parse an individual pricing file from AWS .. versionadded:: 2015.8.0 ''' price_js = http.query(url, text=True) items = [] current_item = '' price_js = re.sub(JS_COMMENT_RE, '', price_js['text']) price_js = price_js.strip().rstrip(');...
Show pricing for a particular profile. This is only an estimate based on unofficial pricing sources.
def show_pricing(kwargs=None, call=None): ''' Show pricing for a particular profile. This is only an estimate, based on unofficial pricing sources. CLI Examples: .. code-block:: bash salt-cloud -f show_pricing my-ec2-config profile=my-profile If pricing sources have not been cached, ...
Associates the specified SSM document with the specified instance
def ssm_create_association(name=None, kwargs=None, instance_id=None, call=None): ''' Associates the specified SSM document with the specified instance http://docs.aws.amazon.com/ssm/latest/APIReference/API_CreateAssociation.html CLI Examples: .. code-block:: bash salt-cloud -a ssm_create...
returns string used to fetch id names from the sdb store.
def _build_machine_uri(machine, cwd): ''' returns string used to fetch id names from the sdb store. the cwd and machine name are concatenated with '?' which should never collide with a Salt node id -- which is important since we will be storing both in the same table. ''' key = '{}?{}'.form...
store the vm_ information keyed by name
def _update_vm_info(name, vm_): ''' store the vm_ information keyed by name ''' __utils__['sdb.sdb_set'](_build_sdb_uri(name), vm_, __opts__) # store machine-to-name mapping, too if vm_['machine']: __utils__['sdb.sdb_set']( _build_machine_uri(vm_['machine'], vm_.get('cwd', '.')), ...
get the information for a VM.
def get_vm_info(name): ''' get the information for a VM. :param name: salt_id name :return: dictionary of {'machine': x, 'cwd': y, ...}. ''' try: vm_ = __utils__['sdb.sdb_get'](_build_sdb_uri(name), __opts__) except KeyError: raise SaltInvocationError( 'Probable ...
returns the salt_id name of the Vagrant VM
def get_machine_id(machine, cwd): ''' returns the salt_id name of the Vagrant VM :param machine: the Vagrant machine name :param cwd: the path to Vagrantfile :return: salt_id name ''' name = __utils__['sdb.sdb_get'](_build_machine_uri(machine, cwd), __opts__) return name
erase the information for a VM the we are destroying.
def _erase_vm_info(name): ''' erase the information for a VM the we are destroying. some sdb drivers (such as the SQLite driver we expect to use) do not have a `delete` method, so if the delete fails, we have to replace the with a blank entry. ''' try: # delete the machine record ...
get the information for ssh communication from the new VM
def _vagrant_ssh_config(vm_): ''' get the information for ssh communication from the new VM :param vm_: the VM's info as we have it now :return: dictionary of ssh stuff ''' machine = vm_['machine'] log.info('requesting vagrant ssh-config for VM %s', machine or '(default)') cmd = 'vagran...
Return a list of the salt_id names of all available Vagrant VMs on this host without regard to the path where they are defined.
def list_domains(): ''' Return a list of the salt_id names of all available Vagrant VMs on this host without regard to the path where they are defined. CLI Example: .. code-block:: bash salt '*' vagrant.list_domains --log-level=info The log shows information about all known Vagrant e...
Return a list of machine names for active virtual machine on the host which are defined in the Vagrantfile at the indicated path.
def list_active_vms(cwd=None): ''' Return a list of machine names for active virtual machine on the host, which are defined in the Vagrantfile at the indicated path. CLI Example: .. code-block:: bash salt '*' vagrant.list_active_vms cwd=/projects/project_1 ''' vms = [] cmd = ...
Return list of information for all the vms indicating their state.
def vm_state(name='', cwd=None): ''' Return list of information for all the vms indicating their state. If you pass a VM name in as an argument then it will return info for just the named VM, otherwise it will return all VMs defined by the Vagrantfile in the `cwd` directory. CLI Example: ...
Initialize a new Vagrant VM.
def init(name, # Salt_id for created VM cwd=None, # path to find Vagrantfile machine='', # name of machine in Vagrantfile runas=None, # username who owns Vagrant box start=False, # start the machine when initialized vagrant_provider='', # vagrant provider (default=virt...
Hard shutdown the virtual machine. ( vagrant halt )
def stop(name): ''' Hard shutdown the virtual machine. (vagrant halt) CLI Example: .. code-block:: bash salt <host> vagrant.stop <salt_id> ''' vm_ = get_vm_info(name) machine = vm_['machine'] cmd = 'vagrant halt {}'.format(machine) ret = __salt__['cmd.retcode'](cmd, ...
Reboot a VM. ( vagrant reload )
def reboot(name, provision=False): ''' Reboot a VM. (vagrant reload) CLI Example: .. code-block:: bash salt <host> vagrant.reboot <salt_id> provision=True :param name: The salt_id name you will use to control this VM :param provision: (False) also re-run the Vagrant provisioning scri...
Destroy and delete a virtual machine. ( vagrant destroy - f )
def destroy(name): ''' Destroy and delete a virtual machine. (vagrant destroy -f) This also removes the salt_id name defined by vagrant.init. CLI Example: .. code-block:: bash salt <host> vagrant.destroy <salt_id> ''' vm_ = get_vm_info(name) machine = vm_['machine'] cmd ...
r Retrieve hints of how you might connect to a Vagrant VM.
def get_ssh_config(name, network_mask='', get_private_key=False): r''' Retrieve hints of how you might connect to a Vagrant VM. :param name: the salt_id of the machine :param network_mask: a CIDR mask to search for the VM's address :param get_private_key: (default: False) return the key used for ss...
Selects the correct operation to be executed on a virtual machine non existing machines will be created existing ones will be updated if the config differs.
def vm_configured(name, vm_name, cpu, memory, image, version, interfaces, disks, scsi_devices, serial_ports, datacenter, datastore, placement, cd_dvd_drives=None, sata_controllers=None, advanced_configs=None, template=None, tools=True, power_on=Fal...
Updates a virtual machine configuration if there is a difference between the given and deployed configuration.
def vm_updated(name, vm_name, cpu, memory, image, version, interfaces, disks, scsi_devices, serial_ports, datacenter, datastore, cd_dvd_drives=None, sata_controllers=None, advanced_configs=None, power_on=False): ''' Updates a virtual machine configuration if there is...
Creates a virtual machine with the given properties if it doesn t exist.
def vm_created(name, vm_name, cpu, memory, image, version, interfaces, disks, scsi_devices, serial_ports, datacenter, datastore, placement, ide_controllers=None, sata_controllers=None, cd_dvd_drives=None, advanced_configs=None, power_on=False): ''' Creates a virtual ...
Registers a virtual machine if the machine files are available on the main datastore.
def vm_registered(vm_name, datacenter, placement, vm_file, power_on=False): ''' Registers a virtual machine if the machine files are available on the main datastore. ''' result = {'name': vm_name, 'result': None, 'changes': {}, 'comment': ''} vmx_path =...
Verify that the given package is installed and is at the correct version ( if specified ).
def installed(name, pkgs=None, dir=None, user=None, force_reinstall=False, registry=None, env=None): ''' Verify that the given package is installed and is at the correct version (if specified). .. code-block:: yaml ...
Verify that the given package is not installed.
def removed(name, dir=None, user=None): ''' Verify that the given package is not installed. dir The target directory in which to install the package, or None for global installation user The user to run NPM with .. versionadded:: 0.17.0 ''' ret = {'name': name,...
Bootstraps a node. js application.
def bootstrap(name, user=None, silent=True): ''' Bootstraps a node.js application. Will execute 'npm install --json' on the specified directory. user The user to run NPM with .. versionadded:: 0.17.0 ''' ret = {'name': name, 'result': None, 'comment': '', 'changes': {}} i...
Ensure that the given package is not cached.
def cache_cleaned(name=None, user=None, force=False): ''' Ensure that the given package is not cached. If no package is specified, this ensures the entire cache is cleared. name The name of the package to remove from the cache, or None for all packages ...
Ensure a search is present
def present(name, profile="splunk", **kwargs): ''' Ensure a search is present .. code-block:: yaml API Error Search: splunk_search.present: search: index=main sourcetype=blah template: alert_5min The following parameters are required: name This i...
Ensure a search is absent
def absent(name, profile="splunk"): ''' Ensure a search is absent .. code-block:: yaml API Error Search: splunk_search.absent The following parameters are required: name This is the name of the search in splunk ''' ret = { 'name': name, 'changes'...
Generic function for bulk worker operation
def _bulk_state(saltfunc, lbn, workers, profile): ''' Generic function for bulk worker operation ''' ret = {'name': lbn, 'result': True, 'changes': {}, 'comment': ''} if not isinstance(workers, list): ret['result'] = False ret['comment'] = 'workers s...
Stop all the workers in the modjk load balancer
def worker_stopped(name, workers=None, profile='default'): ''' Stop all the workers in the modjk load balancer Example: .. code-block:: yaml loadbalancer: modjk.worker_stopped: - workers: - app1 - app2 ''' if workers is None: w...
Activate all the workers in the modjk load balancer
def worker_activated(name, workers=None, profile='default'): ''' Activate all the workers in the modjk load balancer Example: .. code-block:: yaml loadbalancer: modjk.worker_activated: - workers: - app1 - app2 ''' if workers is None: ...
Disable all the workers in the modjk load balancer
def worker_disabled(name, workers=None, profile='default'): ''' Disable all the workers in the modjk load balancer Example: .. code-block:: yaml loadbalancer: modjk.worker_disabled: - workers: - app1 - app2 ''' if workers is None: ...
Recover all the workers in the modjk load balancer
def worker_recover(name, workers=None, profile='default'): ''' Recover all the workers in the modjk load balancer Example: .. code-block:: yaml loadbalancer: modjk.worker_recover: - workers: - app1 - app2 ''' if workers is None: ...
Parses a port forwarding statement in the form used by this state:
def _parse_forward(mapping): ''' Parses a port forwarding statement in the form used by this state: from_port:to_port:protocol[:destination] and returns a ForwardingMapping object ''' if len(mapping.split(':')) > 3: (srcport, destport, protocol, destaddr) = mapping.split(':') else:...
Ensure a zone has specific attributes.
def present(name, block_icmp=None, prune_block_icmp=False, default=None, masquerade=False, ports=None, prune_ports=False, port_fwd=None, prune_port_fwd=False, services=None, prune_services=False, ...
Ensure the service exists and encompasses the specified ports and protocols.
def service(name, ports=None, protocols=None): ''' Ensure the service exists and encompasses the specified ports and protocols. .. versionadded:: 2016.11.0 ''' ret = {'name': name, 'result': False, 'changes': {}, 'comment': ''} if na...
Ensure a zone has specific attributes.
def _present(name, block_icmp=None, prune_block_icmp=False, default=None, masquerade=False, ports=None, prune_ports=False, port_fwd=None, prune_port_fwd=False, services=None, # TODO: prune_services=Fa...
Returns a pretty dictionary meant for command line output.
def todict(self): ''' Returns a pretty dictionary meant for command line output. ''' return { 'Source port': self.srcport, 'Destination port': self.destport, 'Protocol': self.protocol, 'Destination address': self.destaddr}
Return server object used to interact with Jenkins.
def _connect(): ''' Return server object used to interact with Jenkins. :return: server object used to interact with Jenkins ''' jenkins_url = __salt__['config.get']('jenkins.url') or \ __salt__['config.get']('jenkins:url') or \ __salt__['pillar.get']('jenkins.url') jenkins_use...
Helper to cache the config XML and raise a CommandExecutionError if we fail to do so. If we successfully cache the file return the cached path.
def _retrieve_config_xml(config_xml, saltenv): ''' Helper to cache the config XML and raise a CommandExecutionError if we fail to do so. If we successfully cache the file, return the cached path. ''' ret = __salt__['cp.cache_file'](config_xml, saltenv) if not ret: raise CommandExecution...
Check whether the job exists in configured Jenkins jobs.
def job_exists(name=None): ''' Check whether the job exists in configured Jenkins jobs. :param name: The name of the job is check if it exists. :return: True if job exists, False if job does not exist. CLI Example: .. code-block:: bash salt '*' jenkins.job_exists jobname ''' ...
Return information about the Jenkins job.
def get_job_info(name=None): ''' Return information about the Jenkins job. :param name: The name of the job is check if it exists. :return: Information about the Jenkins job. CLI Example: .. code-block:: bash salt '*' jenkins.get_job_info jobname ''' if not name: rai...
Initiate a build for the provided job.
def build_job(name=None, parameters=None): ''' Initiate a build for the provided job. :param name: The name of the job is check if it exists. :param parameters: Parameters to send to the job. :return: True is successful, otherwise raise an exception. CLI Example: .. code-block:: bash ...
Return the configuration file.
def create_job(name=None, config_xml=None, saltenv='base'): ''' Return the configuration file. :param name: The name of the job is check if it exists. :param config_xml: The configuration file to use to create the job. :param saltenv: The environment to look for the fi...
Return true is job is deleted successfully.
def delete_job(name=None): ''' Return true is job is deleted successfully. :param name: The name of the job to delete. :return: Return true if job is deleted successfully. CLI Example: .. code-block:: bash salt '*' jenkins.delete_job jobname ''' if not name: raise Sa...
Return the current status enabled or disabled of the job.
def job_status(name=None): ''' Return the current status, enabled or disabled, of the job. :param name: The name of the job to return status for :return: Return true if enabled or false if disabled. CLI Example: .. code-block:: bash salt '*' jenkins.job_status jobname ''' i...
Return the current job configuration for the provided job.
def get_job_config(name=None): ''' Return the current job configuration for the provided job. :param name: The name of the job to return the configuration for. :return: The configuration for the job specified. CLI Example: .. code-block:: bash salt '*' jenkins.get_job_config jobname ...
.. versionadded:: 2016. 11. 0
def plugin_installed(name): ''' .. versionadded:: 2016.11.0 Return if the plugin is installed for the provided plugin name. :param name: The name of the parameter to confirm installation. :return: True if plugin exists, False if plugin does not exist. CLI Example: .. code-block:: bash ...
.. versionadded:: Fluorine
def record_set_create_or_update(name, zone_name, resource_group, record_type, **kwargs): ''' .. versionadded:: Fluorine Creates or updates a record set within a DNS zone. :param name: The name of the record set, relative to the name of the zone. :param zone_name: The name of the DNS zone (without...
.. versionadded:: Fluorine
def record_set_delete(name, zone_name, resource_group, record_type, **kwargs): ''' .. versionadded:: Fluorine Deletes a record set from a DNS zone. This operation cannot be undone. :param name: The name of the record set, relative to the name of the zone. :param zone_name: The name of the DNS zon...
.. versionadded:: Fluorine
def record_set_get(name, zone_name, resource_group, record_type, **kwargs): ''' .. versionadded:: Fluorine Get a dictionary representing a record set's properties. :param name: The name of the record set, relative to the name of the zone. :param zone_name: The name of the DNS zone (without a term...
.. versionadded:: Fluorine
def record_sets_list_by_type(zone_name, resource_group, record_type, top=None, recordsetnamesuffix=None, **kwargs): ''' .. versionadded:: Fluorine Lists the record sets of a specified type in a DNS zone. :param zone_name: The name of the DNS zone (without a terminating dot). :param resource_group...
.. versionadded:: Fluorine
def record_sets_list_by_dns_zone(zone_name, resource_group, top=None, recordsetnamesuffix=None, **kwargs): ''' .. versionadded:: Fluorine Lists all record sets in a DNS zone. :param zone_name: The name of the DNS zone (without a terminating dot). :param resource_group: The name of the resource gr...
.. versionadded:: Fluorine
def zone_create_or_update(name, resource_group, **kwargs): ''' .. versionadded:: Fluorine Creates or updates a DNS zone. Does not modify DNS records within the zone. :param name: The name of the DNS zone to create (without a terminating dot). :param resource_group: The name of the resource group....
.. versionadded:: Fluorine
def zone_delete(name, resource_group, **kwargs): ''' .. versionadded:: Fluorine Delete a DNS zone within a resource group. :param name: The name of the DNS zone to delete. :param resource_group: The name of the resource group. CLI Example: .. code-block:: bash salt-call azurear...
.. versionadded:: Fluorine
def zone_get(name, resource_group, **kwargs): ''' .. versionadded:: Fluorine Get a dictionary representing a DNS zone's properties, but not the record sets within the zone. :param name: The DNS zone to get. :param resource_group: The name of the resource group. CLI Example: .. code-...
.. versionadded:: Fluorine
def zones_list_by_resource_group(resource_group, top=None, **kwargs): ''' .. versionadded:: Fluorine Lists the DNS zones in a resource group. :param resource_group: The name of the resource group. :param top: The maximum number of DNS zones to return. If not specified, returns up to 100 zones...
.. versionadded:: Fluorine
def zones_list(top=None, **kwargs): ''' .. versionadded:: Fluorine Lists the DNS zones in all resource groups in a subscription. :param top: The maximum number of DNS zones to return. If not specified, returns up to 100 zones. CLI Example: .. code-block:: bash salt-call azurearm...
Check to see if an ELB exists.
def exists(name, region=None, key=None, keyid=None, profile=None): ''' Check to see if an ELB exists. CLI example: .. code-block:: bash salt myminion boto_elb.exists myelb region=us-east-1 ''' conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile) try: elb...
Return all load balancers associated with an account
def get_all_elbs(region=None, key=None, keyid=None, profile=None): ''' Return all load balancers associated with an account CLI example: .. code-block:: bash salt myminion boto_elb.get_all_elbs region=us-east-1 ''' conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)...
Return names of all load balancers associated with an account
def list_elbs(region=None, key=None, keyid=None, profile=None): ''' Return names of all load balancers associated with an account CLI example: .. code-block:: bash salt myminion boto_elb.list_elbs region=us-east-1 ''' return [e.name for e in get_all_elbs(region=region, key=key, keyid...
Get an ELB configuration.
def get_elb_config(name, region=None, key=None, keyid=None, profile=None): ''' Get an ELB configuration. CLI example: .. code-block:: bash salt myminion boto_elb.exists myelb region=us-east-1 ''' conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile) retries = 30 ...
Convert an ELB listener dict into a listener tuple used by certain parts of the AWS ELB API.
def listener_dict_to_tuple(listener): ''' Convert an ELB listener dict into a listener tuple used by certain parts of the AWS ELB API. CLI example: .. code-block:: bash salt myminion boto_elb.listener_dict_to_tuple '{"elb_port":80,"instance_port":80,"elb_protocol":"HTTP"}' ''' # W...
Create an ELB
def create(name, availability_zones, listeners, subnets=None, security_groups=None, scheme='internet-facing', region=None, key=None, keyid=None, profile=None): ''' Create an ELB CLI example to create an ELB: .. code-block:: bash salt myminion boto_elb.create m...
Delete an ELB.
def delete(name, region=None, key=None, keyid=None, profile=None): ''' Delete an ELB. CLI example to delete an ELB: .. code-block:: bash salt myminion boto_elb.delete myelb region=us-east-1 ''' conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile) if not exists(n...
Create listeners on an ELB.
def create_listeners(name, listeners, region=None, key=None, keyid=None, profile=None): ''' Create listeners on an ELB. CLI example: .. code-block:: bash salt myminion boto_elb.create_listeners myelb '[["HTTPS", "HTTP", 443, 80, "arn:aws:iam::11 11111:server-certificate/...
Delete listeners on an ELB.
def delete_listeners(name, ports, region=None, key=None, keyid=None, profile=None): ''' Delete listeners on an ELB. CLI example: .. code-block:: bash salt myminion boto_elb.delete_listeners myelb '[80,443]' ''' conn = _get_conn(region=region, key=key, keyid=keyid,...
Apply security groups to ELB.
def apply_security_groups(name, security_groups, region=None, key=None, keyid=None, profile=None): ''' Apply security groups to ELB. CLI example: .. code-block:: bash salt myminion boto_elb.apply_security_groups myelb '["mysecgroup1"]' ''' conn = _get_conn(re...
Check to see if attributes are set on an ELB.
def get_attributes(name, region=None, key=None, keyid=None, profile=None): ''' Check to see if attributes are set on an ELB. CLI example: .. code-block:: bash salt myminion boto_elb.get_attributes myelb ''' conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile) ret...