Creates a bucket named :attr:`name`.

        :param dict headers:  Any headers to use when performing the HTTP PUT.
544701
def create_bucket(self, name, headers=None):
        
        self.provider.swift_client.put_container(name, headers)
1034269
def make_headers(headers):
    
    out = {}
    if 'etag' in headers:
        out['if-none-match'] = headers['etag']
    if 'last-modified' in headers:
        out['if-modified-since'] = headers['last-modified']
    return out
62807
def create_bucket(bucket_name)
      begin
        s3 = AWS::S3.new
        s3.buckets.create(bucket_name)

      rescue AWS::Errors::Base => s3e
        raise S3AccessError.new(s3e.http_response), s3e.message
      end
    end
609526
def create(self, bucket, descriptor, force=False, indexes_fields=None):
        

        # Make lists
        buckets = bucket
        if isinstance(bucket, six.string_types):
            buckets = [bucket]
        descriptors = descriptor
        if isinstance(descriptor, dict):
            descriptors = [descriptor]
        if indexes_fields is None or len(indexes_fields) == 0:
            indexes_fields = [()] * len(descriptors)
        elif type(indexes_fields[0][0]) not in {list, tuple}:
            indexes_fields = [indexes_fields]

        # Check dimensions
        if not (len(buckets) == len(descriptors) == len(indexes_fields)):
            raise tableschema.exceptions.StorageError('Wrong argument dimensions')

        # Check buckets for existence
        for bucket in reversed(self.buckets):
            if bucket in buckets:
                if not force:
                    message = 'Bucket "%s" already exists.' % bucket
                    raise tableschema.exceptions.StorageError(message)
                self.delete(bucket)

        # Define buckets
        for bucket, descriptor, index_fields in zip(buckets, descriptors, indexes_fields):
            tableschema.validate(descriptor)
            table_name = self.__mapper.convert_bucket(bucket)
            columns, constraints, indexes, fallbacks, table_comment = self.__mapper \
                .convert_descriptor(bucket, descriptor, index_fields, self.__autoincrement)
            Table(table_name, self.__metadata, *(columns + constraints + indexes),
                  comment=table_comment)
            self.__descriptors[bucket] = descriptor
            self.__fallbacks[bucket] = fallbacks

        # Create tables, update metadata
        self.__metadata.create_all()
872796
def create_bucket(self, instance, bucket_name):
        
        req = rest_pb2.CreateBucketRequest()
        req.name = bucket_name
        url = '/buckets/{}'.format(instance)
        self._client.post_proto(url, data=req.SerializeToString())
620174
def create(self, query_name, saved_query):
        
        url = "{0}/{1}".format(self.saved_query_url, query_name)
        payload = saved_query

        # To support clients that may have already called dumps() to work around how this used to
        # work, make sure it's not a str. Hopefully it's some sort of mapping. When we actually
        # try to send the request, client code will get an InvalidJSONError if payload isn't
        # a json-formatted string.
        if not isinstance(payload, str):
            payload = json.dumps(saved_query)

        response = self._get_json(HTTPMethods.PUT, url, self._get_master_key(), data=payload)

        return response
242234
def http_headers
      req_headers = self.reject {|k,v| !k.start_with? "HTTP_" }
      normalized = req_headers.map do |key, value|
        new_key = key.sub("HTTP_",'').split('_').map(&:capitalize).join('-')
        [new_key, value]
      end
      Hash[normalized]
    end
473221
def _build_put_headers(self, robj, if_none_match=False):
        """"""

        # Construct the headers...
        if robj.charset is not None:
            content_type = ('%s; charset="%s"' %
                            (robj.content_type, robj.charset))
        else:
            content_type = robj.content_type

        headers = MultiDict({'Content-Type': content_type,
                             'X-Riak-ClientId': self._client_id})

        # Add the vclock if it exists...
        if robj.vclock is not None:
            headers['X-Riak-Vclock'] = robj.vclock.encode('base64')

        # Create the header from metadata
        self._add_links_for_riak_object(robj, headers)

        for key in robj.usermeta.keys():
            headers['X-Riak-Meta-%s' % key] = robj.usermeta[key]

        for field, value in robj.indexes:
            key = 'X-Riak-Index-%s' % field
            if key in headers:
                headers[key] += ", " + str(value)
            else:
                headers[key] = str(value)

        if if_none_match:
            headers['If-None-Match'] = '*'

        return headers
275277
def create_vhost(self, vname):
        
        vname = quote(vname, '')
        path = Client.urls['vhosts_by_name'] % vname
        return self._call(path, 'PUT',
                                 headers=Client.json_headers)
1282495
def with_headers(self, headers):
        
        for key, value in headers.items():
            self.with_header(key, value)
        return self
831141
def create_header
      nodes = {
        deploymentStatus: 'Deployed',
        description: "A custom object named #{@name}",
        enableActivities: 'true',
        enableFeeds: 'false',
        enableHistory: 'true',
        enableReports: 'true'
      }
      make_nodes(nodes, @doc_root)
    end
715164
def save_headers(cls, filename: str, response: HTTPResponse):
        '''
        '''
        new_filename = filename + '-new'

        with open('wb') as new_file:
            new_file.write(response.header())

            with wpull.util.reset_file_offset(response.body):
                response.body.seek(0)
                shutil.copyfileobj(response.body, new_file)

        os.remove(filename)
        os.rename(new_filename, filename)
404758
def _storage_create(args, _):
  
  buckets = datalab.storage.Buckets(project_id=args['project'])
  errs = []
  for name in args['bucket']:
    try:
      bucket, key = datalab.storage._bucket.parse_name(name)
      if bucket and not key:
        buckets.create(bucket)
      else:
        raise Exception("Invalid bucket name %s" % name)
    except Exception as e:
      errs.append("Couldn't create %s: %s" %
                  (name, _extract_storage_api_response_error(str(e))))
  if errs:
    raise Exception('\n'.join(errs))
1042345
def create(self, name, data=None):
        
        return createPacket(self[name], data) if name in self else None
409306
def create_organization(self, name):
        
        log.warning('Creating organization...')
        url = 'rest/servicedeskapi/organization'
        data = {'name': name}

        return self.post(url, headers=self.experimental_headers, data=data)
26418
def header(self, name, default=None):
        
        wsgi_header = "HTTP_{0}".format(name.upper())

        try:
            return self.env_raw[wsgi_header]
        except KeyError:
            return default
1168827
def put(self, url, data, headers=None):
        
        return self._request('PUT', url, data, headers=headers)