query
stringlengths
9
9.05k
document
stringlengths
10
222k
negatives
listlengths
19
20
metadata
dict
Retrieves the project info by name for later extraction by the auto directives. Looks for the 'project' entry in the options dictionary. This is a less than ideal API but it is designed to match the use of 'create_project_info' above for which it makes much more sense.
def retrieve_project_info_for_auto(self, options) -> AutoProjectInfo: name = options.get("project", self.app.config.breathe_default_project) if name is None: raise NoDefaultProjectError( "No breathe_default_project config setting to fall back on " "for direct...
[ "def get_project(self, name):\n project = self.apiconn.get_object('DescribeProject',\n {'Name': name},\n ProjectInfo)\n\n if project.projectname != None:\n return project", "def get_current_project():\n p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test integration with Faker.
def test_integration(self): result = self.fake.ecommerce_name() self.assertIsInstance(result, str) self.assertGreater(len(result), 1) """Test integration with Faker.""" result = self.fake.ecommerce_category() self.assertIsInstance(result, str) self.assertGreater(...
[ "def fake():\n yield faker.Faker()", "def get_faker(): # pragma: no cover\n selector = randrange(100)\n if 0 <= selector <= 60:\n return Faker('en_GB')\n if 60 < selector <= 75:\n return Faker('es_ES')\n if 75 < selector <= 77:\n return Faker('fr_FR')\n if 77 < selector <= ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Make a 2D array of radius values from a specific center.
def gen_radius_array(shape, center, xy_scale=None, r_scale=None): # Figure out all the scaling complexity if r_scale is not None: rscale = r_scale xscale = 1 yscale = 1 else: if isinstance(xy_scale, (tuple, list, np.ndarray)): rscale = 1 xscale = xy_sc...
[ "def create_2d_circle_kernel(radius):\n return np.array([ np.sqrt( x * x + y * y ) <= float(radius) for y in xrange(-radius, radius+1) for x in xrange(-radius, radius+1)], dtype=np.float32).reshape( radius*2+1, radius*2+1 )", "def radii(data):\n rs = np.empty(len(data))\n for i, (points_sequence, labels_...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generate a 2D radial mask array. Pixels within the radius=(rmin, rmax) from a specified center will be masked by to the value in `mask`.
def gen_radial_mask(shape, center, radius, mask=True, xy_scale=None, r_scale=None): r = gen_radius_array(shape, center, xy_scale=xy_scale, r_scale=r_scale) out = (r >= radius[0]) & (r <= radius[1]) return out if mask else np.logical_not(out)
[ "def circular_mask(radius):\n \n diameter = 2*radius + 1\n \n center_x = center_y = radius\n x, y = np.indices((diameter, diameter))\n \n distances = ((center_x - x) ** 2 + (center_y - y) ** 2) ** 0.5\n return (distances <= radius)", "def _prepared_radial_gradient_mask(size, scale=1):\n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns true is all elements in the array a have a lower value than the corresponding elements in the array b
def is_lower(a, b): for idx, a_value in enumerate(a): if a[idx] > b[idx]: return False return True
[ "def is_smaller_or_equal(array1, array2):\n assert(array1.size == array2.size)\n return all(array2-array1 >= 0)", "def is_smaller(array1, array2):\n assert(array1.size == array2.size)\n return all(array2-array1 > 0)", "def agtb(a, b):\n return matrix(list(map(lambda x, y: x > y, a, b)), a.size)",...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the minimal Euclidian distance between any two pairs of points in the collection of points provided as argument.
def get_min_euclidian_distance(points): min_distance = math.inf for point1, point2 in itertools.combinations(points, 2): distance = MathUtils.get_distance(point1, point2) if distance < min_distance: min_distance = distance return min_distance
[ "def _interpoint_distances(points):\n\n xd = np.subtract.outer(points[:,0], points[:,0])\n yd = np.subtract.outer(points[:,1], points[:,1])\n\n return np.sqrt(xd**2 + yd**2)", "def slow_closest_pair(points):\n dist = float('inf')\n closest_pair = None\n for x in points:\n for y in points:...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the loggamma value using Lanczos approximation formula
def log_gamma(x): return math.lgamma(x)
[ "def lgamma(x):\n cof = [ 76.18009172947146, -86.50532032941677, 24.01409824083091, -1.231739572450155, 0.1208650973866179e-2, -0.5395239384953e-5 ]\n y = x\n tmp = x + 5.5\n tmp -= ((x + 0.5) * math.log(tmp))\n ser = 1.000000000190015\n for j in range(len(cof)):\n y += 1\n ser += (c...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
If the holiday falls on a Saturday, Sunday or Monday then the date is unchanged (Sat/Sun observances are not made up), otherwise use the closest Monday to the date.
def nearest_monday(dt): day = dt.weekday() if day in (TUESDAY, WEDNESDAY, THURSDAY): return dt - timedelta(day - MONDAY) elif day == FRIDAY: return dt + timedelta(3) return dt
[ "def closest_biz_day(self, day, forward=True):\n\n if forward:\n delta = timedelta(days=1)\n else:\n delta = timedelta(days=-1)\n while day.weekday() in self.weekends or day in self.holidays:\n day = day + delta\n return day", "def _FirstSunday(self, dt...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sends messages via telegram bot with specified job data Converts job data to a str in a readable format for messaging One message sent for each job
def send_message(jobs, bot_api_key, bot_chat_id): bot = telepot.Bot(bot_api_key) if jobs: for job in jobs: # job_dict = make_job_dict(job) # job_string = '***New Job Alert***! \n' # for key, value in job_dict.items(): # job_string += f'{key}: {value}\n...
[ "def multiple_send_command(self, job):\n obj = job[1]\n command_list = job[3]\n if obj.device == \" \":\n device = 0\n else:\n device = obj.device\n if obj.system == \" \":\n system = 0\n else:\n system = obj.system\n \n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Accepts the Convertible Reserved Instance exchange quote described in the GetReservedInstancesExchangeQuote call.
def accept_reserved_instances_exchange_quote(DryRun=None, ReservedInstanceIds=None, TargetConfigurations=None): pass
[ "def describe_reserved_instances(DryRun=None, ReservedInstancesIds=None, Filters=None, OfferingType=None, OfferingClass=None):\n pass", "def purchase_reserved_instances_offering(DryRun=None, ReservedInstancesOfferingId=None, InstanceCount=None, LimitPrice=None):\n pass", "def getReservedInstances(verbose)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Accept a VPC peering connection request. To accept a request, the VPC peering connection must be in the pendingacceptance state, and you must be the owner of the peer VPC. Use DescribeVpcPeeringConnections to view your outstanding VPC peering connection requests.
def accept_vpc_peering_connection(DryRun=None, VpcPeeringConnectionId=None): pass
[ "def accept_vpc_peering_connection( # pylint: disable=too-many-arguments\n conn_id=\"\", name=\"\", region=None, key=None, keyid=None, profile=None, dry_run=False\n):\n if not _exactly_one((conn_id, name)):\n raise SaltInvocationError(\n \"One (but not both) of vpc_peering_connection_id or ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Allocates a Dedicated Host to your account. At minimum you need to specify the instance size type, Availability Zone, and quantity of hosts you want to allocate.
def allocate_hosts(AutoPlacement=None, ClientToken=None, InstanceType=None, Quantity=None, AvailabilityZone=None): pass
[ "def create_host(self, host: dict) -> PrivXAPIResponse:\n response_status, data = self._http_post(UrlEnum.HOST_STORE.HOSTS, body=host)\n return PrivXAPIResponse(response_status, HTTPStatus.CREATED, data)", "def _allocate_addresses_for_host(self, context, host):\n mgmt_ip = host.mgmt_ip\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Assigns one or more IPv6 addresses to the specified network interface. You can specify one or more specific IPv6 addresses, or you can specify the number of IPv6 addresses to be automatically assigned from within the subnet's IPv6 CIDR block range. You can assign as many IPv6 addresses to a network interface as you can...
def assign_ipv6_addresses(NetworkInterfaceId=None, Ipv6Addresses=None, Ipv6AddressCount=None): pass
[ "def add_ip6_addr(self, prefix, subnet, mac, interface, interface_label):\n new_ip = silk_ip.assemble(prefix, subnet, mac)\n command = \"ip addr add %s/64 dev %s\" % (new_ip, interface)\n self.store_data(new_ip, interface_label)\n self.make_netns_call_async(command, \"\", 1)\n sel...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Assigns one or more secondary private IP addresses to the specified network interface. You can specify one or more specific secondary IP addresses, or you can specify the number of secondary IP addresses to be automatically assigned within the subnet's CIDR block range. The number of secondary IP addresses that you can...
def assign_private_ip_addresses(NetworkInterfaceId=None, PrivateIpAddresses=None, SecondaryPrivateIpAddressCount=None, AllowReassignment=None): pass
[ "def _assign_secondary_ip_():\n interface_idx = 0\n node = env.nodes[0]\n cidr='%s/%s' % (env.secondary_ip,env.secondary_ip_cidr_prefix_size)\n\n if (_get_secondary_ip_node_().id == node.id):\n debug(\"VPC Secondary IP %s already assigned to %s\" % (cidr, pretty_instance(node)))\n else:\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Associates an Elastic IP address with an instance or a network interface. An Elastic IP address is for use in either the EC2Classic platform or in a VPC. For more information, see Elastic IP Addresses in the Amazon Elastic Compute Cloud User Guide . [EC2Classic, VPC in an EC2VPConly account] If the Elastic IP address i...
def associate_address(DryRun=None, InstanceId=None, PublicIp=None, AllocationId=None, NetworkInterfaceId=None, PrivateIpAddress=None, AllowReassociation=None): pass
[ "def associate_address(self, instance_id, address):\n query = self.query_factory(\n action=\"AssociateAddress\", creds=self.creds,\n endpoint=self.endpoint,\n other_params={\"InstanceId\": instance_id, \"PublicIp\": address})\n d = query.submit()\n return d.addC...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Associates a set of DHCP options (that you've previously created) with the specified VPC, or associates no DHCP options with the VPC. After you associate the options with the VPC, any existing instances and all new instances that you launch in that VPC use the options. You don't need to restart or relaunch the instance...
def associate_dhcp_options(DryRun=None, DhcpOptionsId=None, VpcId=None): pass
[ "def associate_dhcp_options_to_vpc(\n dhcp_options_id,\n vpc_id=None,\n vpc_name=None,\n region=None,\n key=None,\n keyid=None,\n profile=None,\n):\n try:\n vpc_id = check_vpc(vpc_id, vpc_name, region, key, keyid, profile)\n if not vpc_id:\n return {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Associates an IAM instance profile with a running or stopped instance. You cannot associate more than one IAM instance profile with an instance.
def associate_iam_instance_profile(IamInstanceProfile=None, InstanceId=None): pass
[ "def _init_instance_profile(self):\n iam_client = self._session.client('iam')\n\n # Create instance profile\n instance_profile_name = 'AccelizeLoadFPGA'\n with _ExceptionHandler.catch(filter_error_codes='EntityAlreadyExists'):\n iam_client.create_instance_profile(\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Associates a subnet with a route table. The subnet and route table must be in the same VPC. This association causes traffic originating from the subnet to be routed according to the routes in the route table. The action returns an association ID, which you need in order to disassociate the route table from the subnet l...
def associate_route_table(DryRun=None, SubnetId=None, RouteTableId=None): pass
[ "def associate_route_table(\n route_table_id=None,\n subnet_id=None,\n route_table_name=None,\n subnet_name=None,\n region=None,\n key=None,\n keyid=None,\n profile=None,\n):\n\n if all((subnet_id, subnet_name)):\n raise SaltInvocationError(\n \"Only one of subnet_name o...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Associates a CIDR block with your subnet. You can only associate a single IPv6 CIDR block with your subnet. An IPv6 CIDR block must have a prefix length of /64.
def associate_subnet_cidr_block(SubnetId=None, Ipv6CidrBlock=None): pass
[ "def associate_vpc_cidr_block(VpcId=None, AmazonProvidedIpv6CidrBlock=None):\n pass", "def set_subnet_cidr(value, yaml_file):\n yaml_content = get_yaml(elife_global_yaml)\n yaml_content[\"defaults\"][\"aws\"][\"subnet-cidr\"] = value\n write_yaml(yaml_content, yaml_file)", "def add_ip6_addr(self, pr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Associates a CIDR block with your VPC. You can only associate a single Amazonprovided IPv6 CIDR block with your VPC. The IPv6 CIDR block size is fixed at /56.
def associate_vpc_cidr_block(VpcId=None, AmazonProvidedIpv6CidrBlock=None): pass
[ "def associate_subnet_cidr_block(SubnetId=None, Ipv6CidrBlock=None):\n pass", "def associate_address(DryRun=None, InstanceId=None, PublicIp=None, AllocationId=None, NetworkInterfaceId=None, PrivateIpAddress=None, AllowReassociation=None):\n pass", "def set_cidr_ip(value, yaml_file):\n\n new_ports = [22...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Links an EC2Classic instance to a ClassicLinkenabled VPC through one or more of the VPC's security groups. You cannot link an EC2Classic instance to more than one VPC at a time. You can only link an instance that's in the running state. An instance is automatically unlinked from a VPC when it's stopped you can link it ...
def attach_classic_link_vpc(DryRun=None, InstanceId=None, VpcId=None, Groups=None): pass
[ "def vpc_classic_link_security_groups(self) -> Sequence[str]:\n warnings.warn(\"\"\"With the retirement of EC2-Classic the vpc_classic_link_security_groups attribute has been deprecated and will be removed in a future version.\"\"\", DeprecationWarning)\n pulumi.log.warn(\"\"\"vpc_classic_link_securit...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Attaches an Internet gateway to a VPC, enabling connectivity between the Internet and the VPC. For more information about your VPC and Internet gateway, see the Amazon Virtual Private Cloud User Guide .
def attach_internet_gateway(DryRun=None, InternetGatewayId=None, VpcId=None): pass
[ "def igw_attach(session, igw_id=None, vpc_id=None):\n client = session.client('ec2')\n\n with open('outputs/igw.json', 'r') as fo:\n data = json.load(fo)\n igw_id = data.get('InternetGateway', {}).get('InternetGatewayId', None)\n vpc_id = get_vpc_id()\n\n try:\n response = client.attach...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Attaches a network interface to an instance.
def attach_network_interface(DryRun=None, NetworkInterfaceId=None, InstanceId=None, DeviceIndex=None): pass
[ "def attach_port(self, instance_obj, network_obj):\n raise NotImplementedError()", "def attach_interface(self, instance, image_meta, vif):\n self.vif_driver.plug(instance, vif)\n container_id = self._find_container_by_instance(instance).get('id')\n self.vif_driver.attach(instance, vif,...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Attaches a virtual private gateway to a VPC. You can attach one virtual private gateway to one VPC at a time. For more information, see Adding a Hardware Virtual Private Gateway to Your VPC in the Amazon Virtual Private Cloud User Guide .
def attach_vpn_gateway(DryRun=None, VpnGatewayId=None, VpcId=None): pass
[ "def attach_classic_link_vpc(DryRun=None, InstanceId=None, VpcId=None, Groups=None):\n pass", "def attach_internet_gateway(DryRun=None, InternetGatewayId=None, VpcId=None):\n pass", "def addGw(ip):\n logging.debugv(\"functions/linux.py->addGw(ip)\", [ip])\n logging.info(\"setting default gateway to ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[EC2VPC only] Adds one or more egress rules to a security group for use with a VPC. Specifically, this action permits instances to send traffic to one or more destination IPv4 or IPv6 CIDR address ranges, or to one or more destination security groups for the same VPC. This action doesn't apply to security groups for us...
def authorize_security_group_egress(DryRun=None, GroupId=None, SourceSecurityGroupName=None, SourceSecurityGroupOwnerId=None, IpProtocol=None, FromPort=None, ToPort=None, CidrIp=None, IpPermissions=None): pass
[ "def AddVpcNetworkGroupFlags(parser, resource_kind='service', is_update=False):\n group = parser.add_argument_group('Direct VPC egress setting flags group.')\n AddVpcNetworkFlags(group, resource_kind)\n AddVpcSubnetFlags(group, resource_kind)\n if not is_update:\n AddVpcNetworkTagsFlags(group, resource_kind)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Bundles an Amazon instance storebacked Windows instance.
def bundle_instance(DryRun=None, InstanceId=None, Storage=None): pass
[ "def backup_instance(self, instance):\n image_id = self._connection.create_image(\n instance.id,\n self._create_AMI_name(instance)\n )\n self._connection.create_tags([image_id],\n {'instance': instance.id,\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Cancels a bundling operation for an instance storebacked Windows instance.
def cancel_bundle_task(DryRun=None, BundleId=None): pass
[ "def cancel(self):\n self.sa_session.rollback()", "def cancel(self,widget,data=None):\n\n self.box.import_box.destroy()", "def cancel(self):\n try:\n if(self.status & (self.STAT_START)): #the event didn't finish copying\n self.kill = True\n #end if bkp i...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Cancels an active conversion task. The task can be the import of an instance or volume. The action removes all artifacts of the conversion, including a partially uploaded volume or instance. If the conversion is complete or is in the process of transferring the final disk image, the command fails and returns an excepti...
def cancel_conversion_task(DryRun=None, ConversionTaskId=None, ReasonMessage=None): pass
[ "def cancel_task(api, task_id):\n logger.info(\"Canceling transfer\")\n try:\n api.task_cancel(task_id)\n except:\n pass", "def cancel_import_task(DryRun=None, ImportTaskId=None, CancelReason=None):\n pass", "def cancel_upgrade(self, upgrade_task, service):\n pass", "def delet...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Cancels an active export task. The request removes all artifacts of the export, including any partiallycreated Amazon S3 objects. If the export task is complete or is in the process of transferring the final disk image, the command fails and returns an error.
def cancel_export_task(ExportTaskId=None): pass
[ "def delete(self):\n try:\n self.source._api.delete_export(self.source.id, self.id)\n except:\n # Export probably no longer exists\n pass", "def cancel_task(api, task_id):\n logger.info(\"Canceling transfer\")\n try:\n api.task_cancel(task_id)\n excep...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Cancels an inprocess import virtual machine or import snapshot task.
def cancel_import_task(DryRun=None, ImportTaskId=None, CancelReason=None): pass
[ "def cancel_task(api, task_id):\n logger.info(\"Canceling transfer\")\n try:\n api.task_cancel(task_id)\n except:\n pass", "def cancel_upgrade(self, upgrade_task, service):\n pass", "def cancel(self,widget,data=None):\n\n self.box.import_box.destroy()", "def _cancel_exec(s...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Cancels the specified Reserved Instance listing in the Reserved Instance Marketplace. For more information, see Reserved Instance Marketplace in the Amazon Elastic Compute Cloud User Guide .
def cancel_reserved_instances_listing(ReservedInstancesListingId=None): pass
[ "def stop():\n local('aws ec2 stop-instances --instance-ids %s'%(AWS_INSTANCE_ID))", "def delete_instance(self, instance_crn):\n\n safe_crn = urllib.parse.quote(instance_crn, \"\")\n resp = self.session.delete(\n \"{0}/v2/resource_instances/{1}\".format(self.endpoint_url, safe_crn)\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Cancels the specified Spot fleet requests. After you cancel a Spot fleet request, the Spot fleet launches no new Spot instances. You must specify whether the Spot fleet should also terminate its Spot instances. If you terminate the instances, the Spot fleet request enters the cancelled_terminating state. Otherwise, the...
def cancel_spot_fleet_requests(DryRun=None, SpotFleetRequestIds=None, TerminateInstances=None): pass
[ "async def futures_cancel_orders(self, **params):\r\n return await self.client_helper(\"futures_cancel_orders\", **params)", "def cancel_steps(ClusterId=None, StepIds=None, StepCancellationOption=None):\n pass", "def request_cancel(self, *args, **kwargs) -> None:\n self.connection.request_cance...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Cancels one or more Spot instance requests. Spot instances are instances that Amazon EC2 starts on your behalf when the bid price that you specify exceeds the current Spot price. Amazon EC2 periodically sets the Spot price based on available Spot instance capacity and current Spot instance requests. For more informatio...
def cancel_spot_instance_requests(DryRun=None, SpotInstanceRequestIds=None): pass
[ "def request_spot_instances(DryRun=None, SpotPrice=None, ClientToken=None, InstanceCount=None, Type=None, ValidFrom=None, ValidUntil=None, LaunchGroup=None, AvailabilityZoneGroup=None, BlockDurationMinutes=None, LaunchSpecification=None):\n pass", "def wait_for_fulfillment(self, timeout=50, request_ids=None):\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Determines whether a product code is associated with an instance. This action can only be used by the owner of the product code. It is useful when a product code owner needs to verify whether another user's instance is eligible for support.
def confirm_product_instance(DryRun=None, ProductCode=None, InstanceId=None): pass
[ "def product_exist(self, code):\r\n\r\n if code in self.products:\r\n return True\r\n else:\r\n return False", "def instance_exists(self, instance: RuntimeInstance.Params, env: RuntimeEnvironment.Params, **kwargs) -> bool:", "def requested_instance_inspection(self):\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Copies a pointintime snapshot of an EBS volume and stores it in Amazon S3. You can copy the snapshot within the same region or from one region to another. You can use the snapshot to create EBS volumes or Amazon Machine Images (AMIs). The snapshot is copied to the regional endpoint that you send the HTTP request to. Co...
def copy_snapshot(DryRun=None, SourceRegion=None, SourceSnapshotId=None, Description=None, DestinationRegion=None, PresignedUrl=None, Encrypted=None, KmsKeyId=None): pass
[ "def make_snapshot(ec2,vol,retention,description):\n\n snap = ec2.create_snapshot(VolumeId=vol,Description=description)\n return snap", "def add_snapshot(self, *params):\n if not params or len(params)==0:\n raise TypeError(\"add_snapshot takes at lease 1 argument 0 given.\")\n elif ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a set of DHCP options for your VPC. After creating the set, you must associate it with the VPC, causing all existing and new instances that you launch in the VPC to use this set of DHCP options. The following are the individual DHCP options you can specify. For more information about the options, see RFC 2132 ....
def create_dhcp_options(DryRun=None, DhcpConfigurations=None): pass
[ "def create_dhcp_options(\n domain_name=None,\n domain_name_servers=None,\n ntp_servers=None,\n netbios_name_servers=None,\n netbios_node_type=None,\n dhcp_options_name=None,\n tags=None,\n vpc_id=None,\n vpc_name=None,\n region=None,\n key=None,\n keyid=None,\n profile=None,\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[IPv6 only] Creates an egressonly Internet gateway for your VPC. An egressonly Internet gateway is used to enable outbound communication over IPv6 from instances in your VPC to the Internet, and prevents hosts outside of your VPC from initiating an IPv6 connection with your instance.
def create_egress_only_internet_gateway(DryRun=None, VpcId=None, ClientToken=None): pass
[ "def delete_egress_only_internet_gateways():\n client = boto3.client('ec2')\n print('Deleting Egress Only Internet Gateways')\n gw_resp = client.describe_egress_only_internet_gateways()\n while True:\n for gateway in gw_resp['EgressOnlyInternetGateways']:\n gw_id = gateway['EgressOnlyI...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates one or more flow logs to capture IP traffic for a specific network interface, subnet, or VPC. Flow logs are delivered to a specified log group in Amazon CloudWatch Logs. If you specify a VPC or subnet in the request, a log stream is created in CloudWatch Logs for each network interface in the subnet or VPC. Log...
def create_flow_logs(ResourceIds=None, ResourceType=None, TrafficType=None, LogGroupName=None, DeliverLogsPermissionArn=None, ClientToken=None): pass
[ "def create_flows(vpc_id, keyid, secret, region):\n\n session = Session(aws_access_key_id = keyid, aws_secret_access_key = secret, region_name = region)\n\n iam = session.client('iam')\n logs = session.client('logs')\n ec2 = session.client('ec2')\n\n # Check for an existing Role with standard name\n try:\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates an Amazon FPGA Image (AFI) from the specified design checkpoint (DCP). The create operation is asynchronous. To verify that the AFI is ready for use, check the output logs. An AFI contains the FPGA bitstream that is ready to download to an FPGA. You can securely deploy an AFI on one or more FPGAaccelerated inst...
def create_fpga_image(DryRun=None, InputStorageLocation=None, LogsStorageLocation=None, Description=None, Name=None, ClientToken=None): pass
[ "def aws_create_afi(self) -> Optional[bool]:\n local_deploy_dir = get_deploy_dir()\n local_results_dir = f\"{local_deploy_dir}/results-build/{self.build_config.get_build_dir_name()}\"\n\n afi = None\n agfi = None\n s3bucket = self.s3_bucketname\n afiname = self.build_config...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Exports a running or stopped instance to an S3 bucket. For information about the supported operating systems, image formats, and known limitations for the types of instances you can export, see Exporting an Instance as a VM Using VM Import/Export in the VM Import/Export User Guide .
def create_instance_export_task(Description=None, InstanceId=None, TargetEnvironment=None, ExportToS3Task=None): pass
[ "def run_instances(self):\n # create an entry in the s3 log for the start of this task \n self.log_to_s3('run-instances-start.log', 'start')\n\n session = botocore.session.get_session()\n client = session.create_client('ec2', region_name=self.aws_region)\n\n # convert user-data to...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a NAT gateway in the specified subnet. A NAT gateway can be used to enable instances in a private subnet to connect to the Internet. This action creates a network interface in the specified subnet with a private IP address from the IP address range of the subnet. For more information, see NAT Gateways in the Am...
def create_nat_gateway(SubnetId=None, AllocationId=None, ClientToken=None): pass
[ "def create_nat_gateway(\n subnet_id=None,\n subnet_name=None,\n allocation_id=None,\n region=None,\n key=None,\n keyid=None,\n profile=None,\n):\n\n try:\n if all((subnet_id, subnet_name)):\n raise SaltInvocationError(\n \"Only one of subnet_name or subnet_i...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a network ACL in a VPC. Network ACLs provide an optional layer of security (in addition to security groups) for the instances in your VPC. For more information about network ACLs, see Network ACLs in the Amazon Virtual Private Cloud User Guide .
def create_network_acl(DryRun=None, VpcId=None): pass
[ "def create_network_acl(\n vpc_id=None,\n vpc_name=None,\n network_acl_name=None,\n subnet_id=None,\n subnet_name=None,\n tags=None,\n region=None,\n key=None,\n keyid=None,\n profile=None,\n):\n\n _id = vpc_name or vpc_id\n\n try:\n vpc_id = check_vpc(vpc_id, vpc_name, re...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates an entry (a rule) in a network ACL with the specified rule number. Each network ACL has a set of numbered ingress rules and a separate set of numbered egress rules. When determining whether a packet should be allowed in or out of a subnet associated with the ACL, we process the entries in the ACL according to t...
def create_network_acl_entry(DryRun=None, NetworkAclId=None, RuleNumber=None, Protocol=None, RuleAction=None, Egress=None, CidrBlock=None, Ipv6CidrBlock=None, IcmpTypeCode=None, PortRange=None): pass
[ "def create_network_acl_entry(\n network_acl_id=None,\n rule_number=None,\n protocol=None,\n rule_action=None,\n cidr_block=None,\n egress=None,\n network_acl_name=None,\n icmp_code=None,\n icmp_type=None,\n port_range_from=None,\n port_range_to=None,\n region=None,\n key=None...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a placement group that you launch cluster instances into. You must give the group a name that's unique within the scope of your account. For more information about placement groups and cluster instances, see Cluster Instances in the Amazon Elastic Compute Cloud User Guide .
def create_placement_group(DryRun=None, GroupName=None, Strategy=None): pass
[ "def create_group():\r\n new_group = input(\"| Enter the name of the Group |\")\r\n adgroup.ADGroup.create(new_group, security_enabled=True, scope='GLOBAL')\r\n return \"| Group created |\"", "def create(self, group):\n self.request.mongo_connection.shinken.hostgroups.insert(\n group.as...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a listing for Amazon EC2 Standard Reserved Instances to be sold in the Reserved Instance Marketplace. You can submit one Standard Reserved Instance listing at a time. To get a list of your Standard Reserved Instances, you can use the DescribeReservedInstances operation. The Reserved Instance Marketplace matches...
def create_reserved_instances_listing(ReservedInstancesId=None, InstanceCount=None, PriceSchedules=None, ClientToken=None): pass
[ "def getReservedInstances(verbose):\n lres = {}\n jResp = EC2C.describe_reserved_instances()\n for reserved in jResp['ReservedInstances']:\n if reserved['State'] == 'active':\n if verbose:\n lres[reserved['InstanceType']] = str(reserved['Start'])+\";\"+\\\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a route in a route table within a VPC.
def create_route(DryRun=None, RouteTableId=None, DestinationCidrBlock=None, GatewayId=None, DestinationIpv6CidrBlock=None, EgressOnlyInternetGatewayId=None, InstanceId=None, NetworkInterfaceId=None, VpcPeeringConnectionId=None, NatGatewayId=None): pass
[ "def create_route(\n route_table_id=None,\n destination_cidr_block=None,\n route_table_name=None,\n gateway_id=None,\n internet_gateway_name=None,\n instance_id=None,\n interface_id=None,\n vpc_peering_connection_id=None,\n vpc_peering_connection_name=None,\n region=None,\n key=None...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a route table for the specified VPC. After you create a route table, you can add routes and associate the table with a subnet. For more information about route tables, see Route Tables in the Amazon Virtual Private Cloud User Guide .
def create_route_table(DryRun=None, VpcId=None): pass
[ "def create_route(DryRun=None, RouteTableId=None, DestinationCidrBlock=None, GatewayId=None, DestinationIpv6CidrBlock=None, EgressOnlyInternetGatewayId=None, InstanceId=None, NetworkInterfaceId=None, VpcPeeringConnectionId=None, NatGatewayId=None):\n pass", "def configure_routing(vpc):\n internet_gateways =...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a data feed for Spot instances, enabling you to view Spot instance usage logs. You can create one data feed per AWS account. For more information, see Spot Instance Data Feed in the Amazon Elastic Compute Cloud User Guide .
def create_spot_datafeed_subscription(DryRun=None, Bucket=None, Prefix=None): pass
[ "def create_spot_instance(config, job_id, sched_time, docker_image, env_vars):\n\n client = boto3.client('ec2')\n\n # Get my own public fqdn by quering metadata\n my_own_name = urllib2.urlopen(\n \"http://169.254.169.254/latest/meta-data/public-hostname\").read()\n\n user_data = (\n \"#!/b...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a subnet in an existing VPC. When you create each subnet, you provide the VPC ID and the CIDR block you want for the subnet. After you create a subnet, you can't change its CIDR block. The subnet's IPv4 CIDR block can be the same as the VPC's IPv4 CIDR block (assuming you want only a single subnet in the VPC), ...
def create_subnet(DryRun=None, VpcId=None, CidrBlock=None, Ipv6CidrBlock=None, AvailabilityZone=None): pass
[ "def create_subnets(ec2, vpc, subnets):\n # Generate candidate subnet CIDRs by shifting the VPC's prefix by 4 bits, yielding 16 possible subnet\n # CIDRs.\n vpc_cidr = ipaddress.ip_network(vpc.cidr_block)\n subnet_cidrs = list(vpc_cidr.subnets(prefixlen_diff=4))\n\n # The set difference between the a...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates an EBS volume that can be attached to an instance in the same Availability Zone. The volume is created in the regional endpoint that you send the HTTP request to. For more information see Regions and Endpoints . You can create a new empty volume or restore a volume from an EBS snapshot. Any AWS Marketplace prod...
def create_volume(DryRun=None, Size=None, SnapshotId=None, AvailabilityZone=None, VolumeType=None, Iops=None, Encrypted=None, KmsKeyId=None, TagSpecifications=None): pass
[ "def _create_volume(self, name, size):\n\n params = {}\n params['name'] = self.configuration.ixsystems_dataset_path + '/' + name\n params['type'] = 'VOLUME'\n params['volsize'] = ix_utils.get_bytes_from_gb(size)\n jparams = json.dumps(params)\n jparams = jparams.encode('utf...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a VPC with the specified IPv4 CIDR block. The smallest VPC you can create uses a /28 netmask (16 IPv4 addresses), and the largest uses a /16 netmask (65,536 IPv4 addresses). To help you decide how big to make your VPC, see Your VPC and Subnets in the Amazon Virtual Private Cloud User Guide . You can optionally ...
def create_vpc(DryRun=None, CidrBlock=None, InstanceTenancy=None, AmazonProvidedIpv6CidrBlock=None): pass
[ "def create(\n cidr_block,\n instance_tenancy=None,\n vpc_name=None,\n enable_dns_support=None,\n enable_dns_hostnames=None,\n tags=None,\n region=None,\n key=None,\n keyid=None,\n profile=None,\n):\n\n try:\n conn = _get_conn(region=region, key=key, keyid=keyid, profile=prof...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a VPC endpoint for a specified AWS service. An endpoint enables you to create a private connection between your VPC and another AWS service in your account. You can specify an endpoint policy to attach to the endpoint that will control access to the service from your VPC. You can also specify the VPC route tabl...
def create_vpc_endpoint(DryRun=None, VpcId=None, ServiceName=None, PolicyDocument=None, RouteTableIds=None, ClientToken=None): pass
[ "def create_vpc_endpoint(self, vpc_id, route_table_id, service_name):\n params = {'VpcId': vpc_id, 'RouteTableId.1': route_table_id,\n 'ServiceName': service_name}\n return self.get_object('CreateVpcEndpoint', params, VPCEndpoint,\n verb='POST')", "def ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a VPN connection between an existing virtual private gateway and a VPN customer gateway. The only supported connection type is ipsec.1 . The response includes information that you need to give to your network administrator to configure your customer gateway. If you decide to shut down your VPN connection for an...
def create_vpn_connection(DryRun=None, Type=None, CustomerGatewayId=None, VpnGatewayId=None, Options=None): pass
[ "def create_vpn_gateway(DryRun=None, Type=None, AvailabilityZone=None):\n pass", "def CreateVpnGateway(self, request):\n try:\n params = request._serialize()\n headers = request.headers\n body = self.call(\"CreateVpnGateway\", params, headers=headers)\n respon...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a static route associated with a VPN connection between an existing virtual private gateway and a VPN customer gateway. The static route allows traffic to be routed from the virtual private gateway to the VPN customer gateway. For more information about VPN connections, see Adding a Hardware Virtual Private Gat...
def create_vpn_connection_route(VpnConnectionId=None, DestinationCidrBlock=None): pass
[ "def create_route(vserver_name: str, net_gateway_ip: str) -> None:\n \"\"\"The default destination will be set to \"0.0.0.0/0\" for IPv4 gateway addresses\"\"\" \n\n data = {\n 'gateway': net_gateway_ip,\n 'svm': {'name': vserver_name}\n }\n\n route = NetworkRoute(**data)\n\n try:\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a virtual private gateway. A virtual private gateway is the endpoint on the VPC side of your VPN connection. You can create a virtual private gateway before creating the VPC itself. For more information about virtual private gateways, see Adding a Hardware Virtual Private Gateway to Your VPC in the Amazon Virtu...
def create_vpn_gateway(DryRun=None, Type=None, AvailabilityZone=None): pass
[ "def CreateVpnGateway(self, request):\n try:\n params = request._serialize()\n headers = request.headers\n body = self.call(\"CreateVpnGateway\", params, headers=headers)\n response = json.loads(body)\n model = models.CreateVpnGatewayResponse()\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Deletes the specified customer gateway. You must delete the VPN connection before you can delete the customer gateway.
def delete_customer_gateway(DryRun=None, CustomerGatewayId=None): pass
[ "def delete(self, api_client):\n\n cmd = {'id': self.id}\n api_client.deleteVpnCustomerGateway(**cmd)", "def delete_customer_gateway(\n customer_gateway_id=None,\n customer_gateway_name=None,\n region=None,\n key=None,\n keyid=None,\n profile=None,\n):\n\n return _delete_resourc...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Deletes the specified set of DHCP options. You must disassociate the set of DHCP options before you can delete it. You can disassociate the set of DHCP options by associating either a new set of options or the default set of options with the VPC.
def delete_dhcp_options(DryRun=None, DhcpOptionsId=None): pass
[ "def delete_dhcp_options(\n dhcp_options_id=None,\n dhcp_options_name=None,\n region=None,\n key=None,\n keyid=None,\n profile=None,\n):\n\n return _delete_resource(\n resource=\"dhcp_options\",\n name=dhcp_options_name,\n resource_id=dhcp_options_id,\n region=region...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Deletes an egressonly Internet gateway.
def delete_egress_only_internet_gateway(DryRun=None, EgressOnlyInternetGatewayId=None): pass
[ "def delete_egress_only_internet_gateways():\n client = boto3.client('ec2')\n print('Deleting Egress Only Internet Gateways')\n gw_resp = client.describe_egress_only_internet_gateways()\n while True:\n for gateway in gw_resp['EgressOnlyInternetGateways']:\n gw_id = gateway['EgressOnlyI...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Deletes one or more flow logs.
def delete_flow_logs(FlowLogIds=None): pass
[ "def do_delete_logs(self, *args):\n print args\n FileSystemCleaner().delete_logs( )", "def delete_steps(self, logs_id):\n self._get('/walking_logs/%s?_method=delete' % logs_id)", "def delete_regular_logs(_args):\n delete_logs(_args, ('affine.log', 'freeform.log', 'segment.log'))", "def...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Deletes the specified Internet gateway. You must detach the Internet gateway from the VPC before you can delete it.
def delete_internet_gateway(DryRun=None, InternetGatewayId=None): pass
[ "def delete_internet_gateway(\n internet_gateway_id=None,\n internet_gateway_name=None,\n detach=False,\n region=None,\n key=None,\n keyid=None,\n profile=None,\n):\n\n try:\n if internet_gateway_name:\n internet_gateway_id = _get_resource_id(\n \"internet_ga...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Deletes the specified NAT gateway. Deleting a NAT gateway disassociates its Elastic IP address, but does not release the address from your account. Deleting a NAT gateway does not delete any NAT gateway routes in your route tables.
def delete_nat_gateway(NatGatewayId=None): pass
[ "def delete_network_gateway(self, gateway_id):\n return self._delete(self.network_gateway_path % gateway_id)", "def delete_vpn_gateway(DryRun=None, VpnGatewayId=None):\n pass", "def delete_nat_gateway(\n nat_gateway_id,\n release_eips=False,\n region=None,\n key=None,\n keyid=None,\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Deletes the specified network ACL. You can't delete the ACL if it's associated with any subnets. You can't delete the default network ACL.
def delete_network_acl(DryRun=None, NetworkAclId=None): pass
[ "def delete_network_acl(\n network_acl_id=None,\n network_acl_name=None,\n disassociate=False,\n region=None,\n key=None,\n keyid=None,\n profile=None,\n):\n\n if disassociate:\n network_acl = _get_resource(\n \"network_acl\",\n name=network_acl_name,\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Deletes the specified ingress or egress entry (rule) from the specified network ACL.
def delete_network_acl_entry(DryRun=None, NetworkAclId=None, RuleNumber=None, Egress=None): pass
[ "def delete_network_acl_entry(\n network_acl_id=None,\n rule_number=None,\n egress=None,\n network_acl_name=None,\n region=None,\n key=None,\n keyid=None,\n profile=None,\n):\n if not _exactly_one((network_acl_name, network_acl_id)):\n raise SaltInvocationError(\n \"One ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Deletes the specified placement group. You must terminate all instances in the placement group before you can delete the placement group. For more information about placement groups and cluster instances, see Cluster Instances in the Amazon Elastic Compute Cloud User Guide .
def delete_placement_group(DryRun=None, GroupName=None): pass
[ "def delete_placement_groups():\n client = boto3.resource('ec2')\n print('Deleting Placement Groups')\n for placement_group in client.placement_groups.all():\n print('Deleting Placement Group {}'.format(placement_group.name))\n placement_group.delete()\n print('Placement Groups deleted')",...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Deletes the specified route from the specified route table.
def delete_route(DryRun=None, RouteTableId=None, DestinationCidrBlock=None, DestinationIpv6CidrBlock=None): pass
[ "def delete_route_table(\n route_table_id=None,\n route_table_name=None,\n region=None,\n key=None,\n keyid=None,\n profile=None,\n):\n return _delete_resource(\n resource=\"route_table\",\n name=route_table_name,\n resource_id=route_table_id,\n region=region,\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Deletes the specified route table. You must disassociate the route table from any subnets before you can delete it. You can't delete the main route table.
def delete_route_table(DryRun=None, RouteTableId=None): pass
[ "def delete_route_table(\n route_table_id=None,\n route_table_name=None,\n region=None,\n key=None,\n keyid=None,\n profile=None,\n):\n return _delete_resource(\n resource=\"route_table\",\n name=route_table_name,\n resource_id=route_table_id,\n region=region,\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Deletes the data feed for Spot instances.
def delete_spot_datafeed_subscription(DryRun=None): pass
[ "def delete_datapoints(self, data):\n return self._post('datapoints/delete', data=data)", "def delete(self):\n self._omnia_client.time_series.delete(self.id)", "def delete(self, commit=True):\n for dmp in self.dmps:\n dmp.datasets.remove(self)\n\n db.session.delete(self)\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Deletes the specified set of tags from the specified set of resources. This call is designed to follow a DescribeTags request. For more information about tags, see Tagging Your Resources in the Amazon Elastic Compute Cloud User Guide .
def delete_tags(DryRun=None, Resources=None, Tags=None): pass
[ "def remove(self, *resources):\n self.doapi_manager.request(self.url + '/resources', method='DELETE',\n data={\"resources\": _to_taggable(resources)})", "def delete_tags(self, req, resource, tags=None):\n provider = self._get_provider(resource.realm)\n if tag...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Deletes the specified VPC. You must detach or delete all gateways and resources that are associated with the VPC before you can delete it. For example, you must terminate all instances running in the VPC, delete all security groups associated with the VPC (except the default one), delete all route tables associated wit...
def delete_vpc(DryRun=None, VpcId=None): pass
[ "def delete(\n vpc_id=None,\n name=None,\n vpc_name=None,\n tags=None,\n region=None,\n key=None,\n keyid=None,\n profile=None,\n):\n\n if name:\n log.warning(\n \"boto_vpc.delete: name parameter is deprecated use vpc_name instead.\"\n )\n vpc_name = name\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Deletes one or more specified VPC endpoints. Deleting the endpoint also deletes the endpoint routes in the route tables that were associated with the endpoint.
def delete_vpc_endpoints(DryRun=None, VpcEndpointIds=None): pass
[ "def delete_vpc_endpoint_resources():\n print('Deleting VPC endpoints')\n ec2 = boto3.client('ec2')\n endpoint_ids = []\n for endpoint in ec2.describe_vpc_endpoints()['VpcEndpoints']:\n print('Deleting VPC Endpoint - {}'.format(endpoint['ServiceName']))\n endpoint_ids.append(endpoint['VpcE...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Deletes a VPC peering connection. Either the owner of the requester VPC or the owner of the peer VPC can delete the VPC peering connection if it's in the active state. The owner of the requester VPC can delete a VPC peering connection in the pendingacceptance state.
def delete_vpc_peering_connection(DryRun=None, VpcPeeringConnectionId=None): pass
[ "def delete_vpc_peering_connection(\n conn_id=None,\n conn_name=None,\n region=None,\n key=None,\n keyid=None,\n profile=None,\n dry_run=False,\n):\n if not _exactly_one((conn_id, conn_name)):\n raise SaltInvocationError(\n \"Exactly one of conn_id or conn_name must be prov...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Deletes the specified VPN connection. If you're deleting the VPC and its associated components, we recommend that you detach the virtual private gateway from the VPC and delete the VPC before deleting the VPN connection. If you believe that the tunnel credentials for your VPN connection have been compromised, you can d...
def delete_vpn_connection(DryRun=None, VpnConnectionId=None): pass
[ "def delete_vpn_connection_route(VpnConnectionId=None, DestinationCidrBlock=None):\n pass", "def delete_vpn_gateway(DryRun=None, VpnGatewayId=None):\n pass", "def delete_vpn_gateway_connection(self,\n vpn_gateway_id: str,\n id: str,\n **kwargs\n ) -> DetailedResponse:\n\n if...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Deletes the specified static route associated with a VPN connection between an existing virtual private gateway and a VPN customer gateway. The static route allows traffic to be routed from the virtual private gateway to the VPN customer gateway.
def delete_vpn_connection_route(VpnConnectionId=None, DestinationCidrBlock=None): pass
[ "def delete(self, api_client):\n\n cmd = {'id': self.id}\n api_client.deleteVpnCustomerGateway(**cmd)", "def delete_nat_gateway(NatGatewayId=None):\n pass", "async def delete_static_tunnel(self, id):\n if id not in self._static_tunnels:\n raise NETunnelServerNotFound(f'No stat...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Deletes the specified virtual private gateway. We recommend that before you delete a virtual private gateway, you detach it from the VPC and delete the VPN connection. Note that you don't need to delete the virtual private gateway if you plan to delete and recreate the VPN connection between your VPC and your network.
def delete_vpn_gateway(DryRun=None, VpnGatewayId=None): pass
[ "def delete_virtual_gateways():\n client = boto3.client('ec2')\n print('Deleting VPN Gateways')\n gw_resp = client.describe_vpn_gateways()\n while True:\n for gateway in gw_resp['VpnGateways']:\n gw_id = gateway['VpnGatewayId']\n gw_attachments = gateway['VpcAttachments']\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Describes one or more of your Elastic IP addresses. An Elastic IP address is for use in either the EC2Classic platform or in a VPC. For more information, see Elastic IP Addresses in the Amazon Elastic Compute Cloud User Guide .
def describe_addresses(DryRun=None, PublicIps=None, Filters=None, AllocationIds=None): pass
[ "def echo_ip():\n ec2conn = connect_to_region('us-west-2',\n aws_access_key_id=AWS_ACCESS_KEY_ID,\n aws_secret_access_key=AWS_SECRET_ACCESS_KEY)\n reservations = ec2conn.get_all_instances()\n #print reservations.AWS_INSTANCE_ID\n\n instances = [i for r in reservations f...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Describes one or more of the Availability Zones that are available to you. The results include zones only for the region you're currently using. If there is an event impacting an Availability Zone, you can use this request to view the state and any provided message for that Availability Zone. For more information, see ...
def describe_availability_zones(DryRun=None, ZoneNames=None, Filters=None): pass
[ "def availability_zone_list(request):\n az_manager = moganclient(request).availability_zone\n return az_manager.list()", "def get_availability_zones(region, credential):\n return [az.get(\"ZoneName\") for az in describe_availability_zones(region, credential)]", "def availability_zones(self) -> Optional...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Describes one or more of your bundling tasks.
def describe_bundle_tasks(DryRun=None, BundleIds=None, Filters=None): pass
[ "def gen_task_desc(**kwargs):\n logger = logging.getLogger(__name__)\n\n suppressempty = kwargs[\"suppressempty\"]\n blend = kwargs[\"blend_info\"][\"blend\"]\n tasksprefix = kwargs[\"blend_info\"][\"tasksprefix\"]\n blend_dependencies = kwargs[\"blend_dependencies\"]\n\n\n task_desc_path = \"task...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Describes one or more of your linked EC2Classic instances. This request only returns information about EC2Classic instances linked to a VPC through ClassicLink; you cannot use this request to return information about other instances.
def describe_classic_link_instances(DryRun=None, InstanceIds=None, Filters=None, NextToken=None, MaxResults=None): pass
[ "def DescribeClassicLinkInstances(self, request):\n try:\n params = request._serialize()\n headers = request.headers\n body = self.call(\"DescribeClassicLinkInstances\", params, headers=headers)\n response = json.loads(body)\n model = models.DescribeClas...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Describes one or more of your conversion tasks. For more information, see the VM Import/Export User Guide . For information about the import manifest referenced by this API action, see VM Import Manifest .
def describe_conversion_tasks(DryRun=None, ConversionTaskIds=None): pass
[ "def describe_export_tasks(ExportTaskIds=None):\n pass", "def describe_import_image_tasks(DryRun=None, ImportTaskIds=None, NextToken=None, MaxResults=None, Filters=None):\n pass", "def plain_exporter(tasks: List[utils.Task], output: IO):\n tasks = utils.sort_tasks(tasks)\n for task in tasks:\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Describes one or more of your VPN customer gateways. For more information about VPN customer gateways, see Adding a Hardware Virtual Private Gateway to Your VPC in the Amazon Virtual Private Cloud User Guide .
def describe_customer_gateways(DryRun=None, CustomerGatewayIds=None, Filters=None): pass
[ "def describe_vpn_gateways(DryRun=None, VpnGatewayIds=None, Filters=None):\n pass", "def describe_internet_gateways(DryRun=None, InternetGatewayIds=None, Filters=None):\n pass", "def delete_virtual_gateways():\n client = boto3.client('ec2')\n print('Deleting VPN Gateways')\n gw_resp = client.desc...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Describes one or more of your DHCP options sets. For more information about DHCP options sets, see DHCP Options Sets in the Amazon Virtual Private Cloud User Guide .
def describe_dhcp_options(DryRun=None, DhcpOptionsIds=None, Filters=None): pass
[ "def create_dhcp_options(DryRun=None, DhcpConfigurations=None):\n pass", "def configure_dhcp():\n dhcp_config = {}\n dhcp_config_content = \"\"\"\nddns-update-style none;\ndefault-lease-time 600;\nmax-lease-time 7200;\noption domain-name-servers 84.200.69.80, 84.200.70.40;\noption domain-name \"pikube.lo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Describes one or more of your egressonly Internet gateways.
def describe_egress_only_internet_gateways(DryRun=None, EgressOnlyInternetGatewayIds=None, MaxResults=None, NextToken=None): pass
[ "def describe_internet_gateways(DryRun=None, InternetGatewayIds=None, Filters=None):\n pass", "def delete_egress_only_internet_gateways():\n client = boto3.client('ec2')\n print('Deleting Egress Only Internet Gateways')\n gw_resp = client.describe_egress_only_internet_gateways()\n while True:\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Describes one or more of your export tasks.
def describe_export_tasks(ExportTaskIds=None): pass
[ "def plain_exporter(tasks: List[utils.Task], output: IO):\n tasks = utils.sort_tasks(tasks)\n for task in tasks:\n print(\"***\", file=output)\n print(\"task\", utils.task_id_str(task.task_id), file=output)\n print(\"label\", task.label, file=output)\n print(\"status\", str(task.st...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Describes one or more flow logs. To view the information in your flow logs (the log streams for the network interfaces), you must use the CloudWatch Logs console or the CloudWatch Logs API.
def describe_flow_logs(FlowLogIds=None, Filters=None, NextToken=None, MaxResults=None): pass
[ "def DescribeFlowLogs(self, request):\n try:\n params = request._serialize()\n headers = request.headers\n body = self.call(\"DescribeFlowLogs\", params, headers=headers)\n response = json.loads(body)\n model = models.DescribeFlowLogsResponse()\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Describes the Dedicated Host Reservations that are available to purchase. The results describe all the Dedicated Host Reservation offerings, including offerings that may not match the instance family and region of your Dedicated Hosts. When purchasing an offering, ensure that the the instance family and region of the o...
def describe_host_reservation_offerings(OfferingId=None, MinDuration=None, MaxDuration=None, Filters=None, MaxResults=None, NextToken=None): pass
[ "def describe_reserved_instances_offerings(DryRun=None, ReservedInstancesOfferingIds=None, InstanceType=None, AvailabilityZone=None, ProductDescription=None, Filters=None, InstanceTenancy=None, OfferingType=None, NextToken=None, MaxResults=None, IncludeMarketplace=None, MinDuration=None, MaxDuration=None, MaxInstan...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Describes Dedicated Host Reservations which are associated with Dedicated Hosts in your account.
def describe_host_reservations(HostReservationIdSet=None, Filters=None, MaxResults=None, NextToken=None): pass
[ "def describe_host_reservation_offerings(OfferingId=None, MinDuration=None, MaxDuration=None, Filters=None, MaxResults=None, NextToken=None):\n pass", "def describe_addresses(DryRun=None, PublicIps=None, Filters=None, AllocationIds=None):\n pass", "def describe_reserved_instances(DryRun=None, ReservedInst...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Describes your IAM instance profile associations.
def describe_iam_instance_profile_associations(AssociationIds=None, Filters=None, MaxResults=None, NextToken=None): pass
[ "def profiles(self) -> Sequence[str]:\n return pulumi.get(self, \"profiles\")", "def __str__(self):\n return \"Association %s \" % str(self._tuple)", "def print_profiles(profiles):\n\n print \"Available profiles for the pods are the following:\"\n\n for profile in profiles:\n prin...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Describes the ID format settings for your resources on a perregion basis, for example, to view which resource types are enabled for longer IDs. This request only returns information about resource types whose ID formats can be modified; it does not return information about other resource types.
def describe_id_format(Resource=None): pass
[ "def listMetadataFormats(identifier=None):", "def listFormats(self, type='255', returnFormat='None'):\n \n pass", "def get_formats(cls):\n return RegionsRegistry.get_formats(cls)", "async def list_formats(info_dict: dict) -> str:\n formats = info_dict.get('formats', [info_dict])\n table...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Describes the ID format settings for resources for the specified IAM user, IAM role, or root user. For example, you can view the resource types that are enabled for longer IDs. This request only returns information about resource types whose ID formats can be modified; it does not return information about other resourc...
def describe_identity_id_format(Resource=None, PrincipalArn=None): pass
[ "def listMetadataFormats(identifier=None):", "def modify_identity_id_format(Resource=None, UseLongIds=None, PrincipalArn=None):\n pass", "def listFormats(self, type='255', returnFormat='None'):\n \n pass", "def resource_types_show(self,resource_type):\n \n path=\"/resource_types/%s\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Describes the specified attribute of the specified AMI. You can specify only one attribute at a time.
def describe_image_attribute(DryRun=None, ImageId=None, Attribute=None): pass
[ "def describe_network_interface_attribute(DryRun=None, NetworkInterfaceId=None, Attribute=None):\n pass", "def describe_attr_value(attr, die, section_offset):\r\n descr_func = _ATTR_DESCRIPTION_MAP[attr.form]\r\n val_description = descr_func(attr, die, section_offset)\r\n\r\n # For some attributes we ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Describes one or more of the images (AMIs, AKIs, and ARIs) available to you. Images available to you include public images, private images that you own, and private images owned by other AWS accounts but for which you have explicit launch permissions.
def describe_images(DryRun=None, ImageIds=None, Owners=None, ExecutableUsers=None, Filters=None): pass
[ "def get_amis():\n print(\"looking for images that fit {}\".format(os.environ[\"CREATE_AMI_NAME\"]))\n images = EC2.describe_images(\n Owners=[\"self\"],\n Filters=[\n {\"Name\": \"name\", \"Values\": [\"{}*\".format(os.environ[\"CREATE_AMI_NAME\"])]}\n ],\n )\n sorted_im...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Displays details about an import virtual machine or import snapshot tasks that are already created.
def describe_import_image_tasks(DryRun=None, ImportTaskIds=None, NextToken=None, MaxResults=None, Filters=None): pass
[ "def describe_import_snapshot_tasks(DryRun=None, ImportTaskIds=None, NextToken=None, MaxResults=None, Filters=None):\n pass", "def show_tasks(self):\n print('\\nCompleted to following tasks:')\n for step in self.tasks:\n print('\\t{0}'.format(step))", "def show_task(path, final_only)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Describes your import snapshot tasks.
def describe_import_snapshot_tasks(DryRun=None, ImportTaskIds=None, NextToken=None, MaxResults=None, Filters=None): pass
[ "def describe_import_image_tasks(DryRun=None, ImportTaskIds=None, NextToken=None, MaxResults=None, Filters=None):\n pass", "def describe_export_tasks(ExportTaskIds=None):\n pass", "def import_task(self, img, cont, img_format=None, img_name=None):\r\n return self._tasks_manager.create(\"import\", im...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Describes one or more of your Internet gateways.
def describe_internet_gateways(DryRun=None, InternetGatewayIds=None, Filters=None): pass
[ "def describe_vpn_gateways(DryRun=None, VpnGatewayIds=None, Filters=None):\n pass", "def describe_customer_gateways(DryRun=None, CustomerGatewayIds=None, Filters=None):\n pass", "def describe_nat_gateways(NatGatewayIds=None, Filters=None, MaxResults=None, NextToken=None):\n pass", "def describe_egres...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Describes one or more of your key pairs. For more information about key pairs, see Key Pairs in the Amazon Elastic Compute Cloud User Guide .
def describe_key_pairs(DryRun=None, KeyNames=None, Filters=None): pass
[ "def ex_describe_all_keypairs(self):\r\n names = [key_pair.name for key_pair in self.list_key_pairs()]\r\n return names", "def getkeypairs(show):\n keypairlist=[]\n \n try:\n keypairs=ec2.describe_key_pairs()\n except botocore.exceptions.ClientError as e:\n colo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Describes one or more of the your NAT gateways.
def describe_nat_gateways(NatGatewayIds=None, Filters=None, MaxResults=None, NextToken=None): pass
[ "def describe_internet_gateways(DryRun=None, InternetGatewayIds=None, Filters=None):\n pass", "def describe_vpn_gateways(DryRun=None, VpnGatewayIds=None, Filters=None):\n pass", "def describe_nat_gateways(\n nat_gateway_id=None,\n subnet_id=None,\n subnet_name=None,\n vpc_id=None,\n vpc_nam...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Describes one or more of your network ACLs. For more information about network ACLs, see Network ACLs in the Amazon Virtual Private Cloud User Guide .
def describe_network_acls(DryRun=None, NetworkAclIds=None, Filters=None): pass
[ "def get_network_acls(self):\n try:\n # Connect to api endpoint for network_acls\n path = (\"/v1/network_acls?version={}&generation={}\".format(\n self.cfg[\"version\"], self.cfg[\"generation\"]))\n\n # Return data\n return qw(\"iaas\", \"GET\", path...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Describes a network interface attribute. You can specify only one attribute at a time.
def describe_network_interface_attribute(DryRun=None, NetworkInterfaceId=None, Attribute=None): pass
[ "def modify_network_interface_attribute(DryRun=None, NetworkInterfaceId=None, Description=None, SourceDestCheck=None, Groups=None, Attachment=None):\n pass", "def interface_description(self, intconf):\n if not intconf['enabled']:\n return \"DISABLED\"\n\n if intconf['nb_int_desc']:\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Describes one or more of your network interfaces.
def describe_network_interfaces(DryRun=None, NetworkInterfaceIds=None, Filters=None): pass
[ "def describe_network_interface_attribute(DryRun=None, NetworkInterfaceId=None, Attribute=None):\n pass", "def network_interfaces(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['EndpointAccessVpcEndpointNetworkInterfaceArgs']]]]:\n return pulumi.get(self, \"network_interfaces\")", "def network_i...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Describes one or more of your placement groups. For more information about placement groups and cluster instances, see Cluster Instances in the Amazon Elastic Compute Cloud User Guide .
def describe_placement_groups(DryRun=None, GroupNames=None, Filters=None): pass
[ "def delete_placement_groups():\n client = boto3.resource('ec2')\n print('Deleting Placement Groups')\n for placement_group in client.placement_groups.all():\n print('Deleting Placement Group {}'.format(placement_group.name))\n placement_group.delete()\n print('Placement Groups deleted')",...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }