Create a new instance using the specified API key.
772288
public static PagerDuty create(String apiKey) {
    Retrofit retrofit = new Retrofit.Builder() //
        .baseUrl(HOST) //
        .addConverterFactory(GsonConverterFactory.create())
        .build();
    return create(apiKey, retrofit);
  }
782577
def createFromAPIKey(self, apikey, maybeWriteDefault=False):
        
        self._data = {
            'default_key': 'default',
            'keys': {
                'default': {
                    'key': apikey,
                    'desc': 'imported API key'
                }
            }
        }
        self._keyID = 'default'
        self._doDefaults()
        if maybeWriteDefault:
            path = os.path.expanduser(self.DEFAULT_CONFIG_FILE)
            self.write(path)
217931
def _create_key(lang, instance):
        """"""
        model_name = instance.__class__.__name__
        return "{0}__{1}_{2}".format(lang,model_name,instance.id)
903762
def create_instance(self, credentials, name, **kwargs):
        """"""
        op_name = create_instance(
            credentials, self.project, self.zone, name,
            machine_type=self.machine_type,
            disk_size_gb=self.disk_size_gb,
            **kwargs)
        
        return op_name
645886
def create(context, resource, **kwargs):
    """"""
    data = utils.sanitize_kwargs(**kwargs)
    uri = '%s/%s' % (context.dci_cs_api, resource)
    r = context.session.post(uri, timeout=HTTP_TIMEOUT,
                             json=data)
    return r
187047
def from_key(cls, *args):
        
        key = args if len(args) > 1 else args[0]
        return cls._instances.get(key, None)
1243105
def create_object(self, bucket, key):
        
        # Initial validation of size based on Content-Length.
        # User can tamper with Content-Length, so this is just an initial up
        # front check. The storage subsystem must validate the size limit as
        # well.
        stream, content_length, content_md5, tags = \
            current_files_rest.upload_factory()

        size_limit = bucket.size_limit
        if content_length and size_limit and content_length > size_limit:
            desc = 'File size limit exceeded.' \
                if isinstance(size_limit, int) else size_limit.reason
            raise FileSizeError(description=desc)

        with db.session.begin_nested():
            obj = ObjectVersion.create(bucket, key)
            obj.set_contents(
                stream, size=content_length, size_limit=size_limit)
            # Check add tags
            if tags:
                for key, value in tags.items():
                    ObjectVersionTag.create(obj, key, value)

        db.session.commit()
        return self.make_response(
            data=obj,
            context={
                'class': ObjectVersion,
                'bucket': bucket,
            },
            etag=obj.file.checksum
        )
418253
def add_new_key(self, code, name):
        """"""
        device_json = {"code": code, "name": name}
        return self.api_interface.create_lock_key(self, device_json)
451015
public void create() throws APIException {
        CreateDirectoryRequest reqObj = new CreateDirectoryRequest(this.getName(), null);
        Gson gson = new Gson();
        JsonElement inputJson = gson.toJsonTree(reqObj);

        String url = this.getParent().getUrl();
        HttpResponse response = this.client.post(url, new StringEntity(inputJson.toString(), ContentType.APPLICATION_JSON));
        HttpClientHelpers.throwIfNotOk(response);
    }
1134563
public static base_response create(nitro_service client, sslwrapkey resource) throws Exception {
		sslwrapkey createresource = new sslwrapkey();
		createresource.wrapkeyname = resource.wrapkeyname;
		createresource.password = resource.password;
		createresource.salt = resource.salt;
		return createresource.perform_operation(client,"create");
	}
857526
private ApiKeyAuthenticationInfo createAuthenticationInfo(String authenticationId, ApiKey apiKey) {
        return new ApiKeyAuthenticationInfo(authenticationId, apiKey, getName());
    }
1176670
def create(cls, bucket, key, value):
        """"""
        with db.session.begin_nested():
            obj = cls(
                bucket_id=as_bucket_id(bucket),
                key=key,
                value=value
            )
            db.session.add(obj)
        return obj
286810
public Object newInstance( String name, Object... params ) throws ClassLoaderException {
        return newInstance( name, params, null );
    }
637029
public static Object newInstance(String name) {
        try {
            return forName(name).newInstance();
        } catch (InstantiationException e) {
            throw new IllegalStateException(e.getMessage(), e);
        } catch (IllegalAccessException e) {
            throw new IllegalStateException(e.getMessage(), e);
        }
    }
1351846
def create_instance(self, port):
        """"""
        instance_type = self.get_instance_type(port)
        if not instance_type:
            return
        i_res = MechResource(port['device_id'], instance_type, a_const.CREATE)
        self.provision_queue.put(i_res)
1116716
def create(cls, service=None, endpoint=None, data=None, *args, **kwargs):
        
        cls.validate(data)

        if service is None and endpoint is None:
            raise InvalidArguments(service, endpoint)
        if endpoint is None:
            sid = service['id'] if isinstance(service, Entity) else service
            endpoint = 'services/{0}/integrations'.format(sid)

        # otherwise endpoint should contain the service path too
        return getattr(Entity, 'create').__func__(cls, endpoint=endpoint,
                                                  data=data, *args, **kwargs)
611515
def create(self, **kwargs):
        """"""
        resp = self.client.create(url=self.base_url,
                                  json=kwargs)
        return resp