Connection module for Amazon ELB
New in version 2014.7.0.
configuration: | This module accepts explicit elb credentials but can also utilize IAM roles assigned to the instance trough Instance Profiles. Dynamic credentials are then automatically obtained from AWS API and no further configuration is necessary. More Information available at: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html
If IAM roles are not used you need to specify them either in a pillar or in the minion's config file: elb.keyid: GKTADJGHEIQSXMKKRBJ08H
elb.key: askdjghsdfjkghWupUjasdflkdfklgjsdfjajkghs
A region may also be specified in the configuration: elb.region: us-east-1
If a region is not specified, the default is us-east-1. It's also possible to specify key, keyid and region via a profile, either as a passed in dict, or as a string to pull from pillars or minion config: myprofile:
keyid: GKTADJGHEIQSXMKKRBJ08H
key: askdjghsdfjkghWupUjasdflkdfklgjsdfjajkghs
region: us-east-1
|
---|---|
depends: | boto >= 2.33.0 |
salt.modules.boto_elb.
apply_security_groups
(name, security_groups, region=None, key=None, keyid=None, profile=None)¶Apply security groups to ELB.
CLI example:
salt myminion boto_elb.apply_security_groups myelb '["mysecgroup1"]'
salt.modules.boto_elb.
attach_subnets
(name, subnets, region=None, key=None, keyid=None, profile=None)¶Attach ELB to subnets.
CLI example:
salt myminion boto_elb.attach_subnets myelb '["mysubnet"]'
salt.modules.boto_elb.
create
(name, availability_zones, listeners=None, 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:
salt myminion boto_elb.create myelb '["us-east-1a", "us-east-1e"]' listeners='[[443, 80, "HTTPS", "HTTP", "arn:aws:iam::1111111:server-certificate/mycert"]]' region=us-east-1
salt.modules.boto_elb.
create_listeners
(name, listeners=None, region=None, key=None, keyid=None, profile=None)¶Create listeners on an ELB.
CLI example:
salt myminion boto_elb.create_listeners myelb listeners='[["HTTPS", "HTTP", 443, 80, "arn:aws:iam::11 11111:server-certificate/mycert"]]'
salt.modules.boto_elb.
delete
(name, region=None, key=None, keyid=None, profile=None)¶Delete an ELB.
CLI example to delete an ELB:
salt myminion boto_elb.delete myelb region=us-east-1
salt.modules.boto_elb.
delete_listeners
(name, ports, region=None, key=None, keyid=None, profile=None)¶Delete listeners on an ELB.
CLI example:
salt myminion boto_elb.delete_listeners myelb '[80,443]'
salt.modules.boto_elb.
deregister_instances
(name, instances, region=None, key=None, keyid=None, profile=None)¶Deregister instances with an ELB. Instances is either a string instance id or a list of string instance id's.
Returns:
True
: instance(s) deregistered successfullyFalse
: instance(s) failed to be deregisteredNone
: instance(s) not valid or not registered, no action takenCLI example:
salt myminion boto_elb.deregister_instances myelb instance_id
salt myminion boto_elb.deregister_instances myelb "[instance_id, instance_id]"
salt.modules.boto_elb.
detach_subnets
(name, subnets, region=None, key=None, keyid=None, profile=None)¶Detach ELB from subnets.
CLI example:
salt myminion boto_elb.detach_subnets myelb '["mysubnet"]'
salt.modules.boto_elb.
disable_availability_zones
(name, availability_zones, region=None, key=None, keyid=None, profile=None)¶Disable availability zones for ELB.
CLI example:
salt myminion boto_elb.disable_availability_zones myelb '["us-east-1a"]'
salt.modules.boto_elb.
enable_availability_zones
(name, availability_zones, region=None, key=None, keyid=None, profile=None)¶Enable availability zones for ELB.
CLI example:
salt myminion boto_elb.enable_availability_zones myelb '["us-east-1a"]'
salt.modules.boto_elb.
exists
(name, region=None, key=None, keyid=None, profile=None)¶Check to see if an ELB exists.
CLI example:
salt myminion boto_elb.exists myelb region=us-east-1
salt.modules.boto_elb.
get_attributes
(name, region=None, key=None, keyid=None, profile=None)¶Check to see if attributes are set on an ELB.
CLI example:
salt myminion boto_elb.get_attributes myelb
salt.modules.boto_elb.
get_elb_config
(name, region=None, key=None, keyid=None, profile=None)¶Check to see if an ELB exists.
CLI example:
salt myminion boto_elb.exists myelb region=us-east-1
salt.modules.boto_elb.
get_health_check
(name, region=None, key=None, keyid=None, profile=None)¶Get the health check configured for this ELB.
CLI example:
salt myminion boto_elb.get_health_check myelb
salt.modules.boto_elb.
get_instance_health
(name, region=None, key=None, keyid=None, profile=None, instances=None)¶Get a list of instances and their health state
CLI example:
salt myminion boto_elb.get_instance_health myelb
salt myminion boto_elb.get_instance_health myelb region=us-east-1 instances="[instance_id,instance_id]"
salt.modules.boto_elb.
register_instances
(name, instances, region=None, key=None, keyid=None, profile=None)¶Register instances with an ELB. Instances is either a string instance id or a list of string instance id's.
Returns:
True
: instance(s) registered successfullyFalse
: instance(s) failed to be registeredCLI example:
salt myminion boto_elb.register_instances myelb instance_id
salt myminion boto_elb.register_instances myelb "[instance_id,instance_id]"
salt.modules.boto_elb.
set_attributes
(name, attributes, region=None, key=None, keyid=None, profile=None)¶Set attributes on an ELB.
CLI example to set attributes on an ELB:
salt myminion boto_elb.set_attributes myelb '{"access_log": {"enabled": "true", "s3_bucket_name": "mybucket", "s3_bucket_prefix": "mylogs/", "emit_interval": "5"}}' region=us-east-1
salt.modules.boto_elb.
set_health_check
(name, health_check, region=None, key=None, keyid=None, profile=None)¶Set attributes on an ELB.
CLI example to set attributes on an ELB:
salt myminion boto_elb.set_health_check myelb '{"target": "HTTP:80/"}'