Class v1.ResourceSettingsServiceClient (1.0.2)

An interface to interact with resource settings and setting values throughout the resource hierarchy.

Services may surface a number of settings for users to control how their resources behave. Values of settings applied on a given Cloud resource are evaluated hierarchically and inherited by all descendants of that resource.

For all requests, returns a google.rpc.Status with google.rpc.Code.PERMISSION_DENIED if the IAM check fails or the parent resource is not in a Cloud Organization. For all requests, returns a google.rpc.Status with google.rpc.Code.INVALID_ARGUMENT if the request is malformed. v1

Package

@google-cloud/resource-settings!

Constructors

(constructor)(opts)

constructor(opts?: ClientOptions);

Construct an instance of ResourceSettingsServiceClient.

Parameter
NameDescription
opts ClientOptions

Properties

apiEndpoint

static get apiEndpoint(): string;

The DNS address for this API service - same as servicePath(), exists for compatibility reasons.

Property Value
TypeDescription
string

auth

auth: gax.GoogleAuth;
Property Value
TypeDescription
gax.GoogleAuth

descriptors

descriptors: Descriptors;
Property Value
TypeDescription
Descriptors

innerApiCalls

innerApiCalls: {
        [name: string]: Function;
    };
Property Value
TypeDescription
{ [name: string]: Function; }

pathTemplates

pathTemplates: {
        [name: string]: gax.PathTemplate;
    };
Property Value
TypeDescription
{ [name: string]: gax.PathTemplate; }

port

static get port(): number;

The port for this API service.

Property Value
TypeDescription
number

resourceSettingsServiceStub

resourceSettingsServiceStub?: Promise<{
        [name: string]: Function;
    }>;
Property Value
TypeDescription
Promise<{ [name: string]: Function; }>

scopes

static get scopes(): string[];

The scopes needed to make gRPC calls for every method defined in this service.

Property Value
TypeDescription
string[]

servicePath

static get servicePath(): string;

The DNS address for this API service.

Property Value
TypeDescription
string

warn

warn: (code: string, message: string, warnType?: string) => void;
Property Value
TypeDescription
(code: string, message: string, warnType?: string) => void

Methods

close()

close(): Promise<void>;

Terminate the gRPC channel and close the client.

The client will no longer be usable and all future behavior is undefined.

Returns
TypeDescription
Promise<void>

{Promise} A promise that resolves when the client is closed.

folderSettingNamePath(folder, settingName)

folderSettingNamePath(folder: string, settingName: string): string;

Return a fully-qualified folderSettingName resource name string.

Parameters
NameDescription
folder string
settingName string
Returns
TypeDescription
string

{string} Resource name string.

getProjectId()

getProjectId(): Promise<string>;
Returns
TypeDescription
Promise<string>

getProjectId(callback)

getProjectId(callback: Callback<string, undefined, undefined>): void;
Parameter
NameDescription
callback Callback<string, undefined, undefined>
Returns
TypeDescription
void

getSetting(request, options)

getSetting(request?: protos.google.cloud.resourcesettings.v1.IGetSettingRequest, options?: CallOptions): Promise<[
        protos.google.cloud.resourcesettings.v1.ISetting,
        protos.google.cloud.resourcesettings.v1.IGetSettingRequest | undefined,
        {} | undefined
    ]>;
Parameters
NameDescription
request protos.google.cloud.resourcesettings.v1.IGetSettingRequest
options CallOptions
Returns
TypeDescription
Promise<[ protos.google.cloud.resourcesettings.v1.ISetting, protos.google.cloud.resourcesettings.v1.IGetSettingRequest | undefined, {} | undefined ]>

getSetting(request, options, callback)

getSetting(request: protos.google.cloud.resourcesettings.v1.IGetSettingRequest, options: CallOptions, callback: Callback<protos.google.cloud.resourcesettings.v1.ISetting, protos.google.cloud.resourcesettings.v1.IGetSettingRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.resourcesettings.v1.IGetSettingRequest
options CallOptions
callback Callback<protos.google.cloud.resourcesettings.v1.ISetting, protos.google.cloud.resourcesettings.v1.IGetSettingRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getSetting(request, callback)

getSetting(request: protos.google.cloud.resourcesettings.v1.IGetSettingRequest, callback: Callback<protos.google.cloud.resourcesettings.v1.ISetting, protos.google.cloud.resourcesettings.v1.IGetSettingRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.resourcesettings.v1.IGetSettingRequest
callback Callback<protos.google.cloud.resourcesettings.v1.ISetting, protos.google.cloud.resourcesettings.v1.IGetSettingRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

initialize()

initialize(): Promise<{
        [name: string]: Function;
    }>;

Initialize the client. Performs asynchronous operations (such as authentication) and prepares the client. This function will be called automatically when any class method is called for the first time, but if you need to initialize it before calling an actual method, feel free to call initialize() directly.

You can await on this method if you want to make sure the client is initialized.

Returns
TypeDescription
Promise<{ [name: string]: Function; }>

{Promise} A promise that resolves to an authenticated service stub.

listSettings(request, options)

listSettings(request?: protos.google.cloud.resourcesettings.v1.IListSettingsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.resourcesettings.v1.ISetting[],
        protos.google.cloud.resourcesettings.v1.IListSettingsRequest | null,
        protos.google.cloud.resourcesettings.v1.IListSettingsResponse
    ]>;
Parameters
NameDescription
request protos.google.cloud.resourcesettings.v1.IListSettingsRequest
options CallOptions
Returns
TypeDescription
Promise<[ protos.google.cloud.resourcesettings.v1.ISetting[], protos.google.cloud.resourcesettings.v1.IListSettingsRequest | null, protos.google.cloud.resourcesettings.v1.IListSettingsResponse ]>

listSettings(request, options, callback)

listSettings(request: protos.google.cloud.resourcesettings.v1.IListSettingsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.resourcesettings.v1.IListSettingsRequest, protos.google.cloud.resourcesettings.v1.IListSettingsResponse | null | undefined, protos.google.cloud.resourcesettings.v1.ISetting>): void;
Parameters
NameDescription
request protos.google.cloud.resourcesettings.v1.IListSettingsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.resourcesettings.v1.IListSettingsRequest, protos.google.cloud.resourcesettings.v1.IListSettingsResponse | null | undefined, protos.google.cloud.resourcesettings.v1.ISetting>
Returns
TypeDescription
void

listSettings(request, callback)

listSettings(request: protos.google.cloud.resourcesettings.v1.IListSettingsRequest, callback: PaginationCallback<protos.google.cloud.resourcesettings.v1.IListSettingsRequest, protos.google.cloud.resourcesettings.v1.IListSettingsResponse | null | undefined, protos.google.cloud.resourcesettings.v1.ISetting>): void;
Parameters
NameDescription
request protos.google.cloud.resourcesettings.v1.IListSettingsRequest
callback PaginationCallback<protos.google.cloud.resourcesettings.v1.IListSettingsRequest, protos.google.cloud.resourcesettings.v1.IListSettingsResponse | null | undefined, protos.google.cloud.resourcesettings.v1.ISetting>
Returns
TypeDescription
void

listSettingsAsync(request, options)

listSettingsAsync(request?: protos.google.cloud.resourcesettings.v1.IListSettingsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.resourcesettings.v1.ISetting>;

Equivalent to listSettings, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
NameDescription
request protos.google.cloud.resourcesettings.v1.IListSettingsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.resourcesettings.v1.ISetting>

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing [Setting]. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listSettingsStream(request, options)

listSettingsStream(request?: protos.google.cloud.resourcesettings.v1.IListSettingsRequest, options?: CallOptions): Transform;

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
NameDescription
request protos.google.cloud.resourcesettings.v1.IListSettingsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing [Setting] on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listSettingsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

matchFolderFromFolderSettingNameName(folderSettingNameName)

matchFolderFromFolderSettingNameName(folderSettingNameName: string): string | number;

Parse the folder from FolderSettingName resource.

Parameter
NameDescription
folderSettingNameName string

A fully-qualified path representing folder_setting_name resource.

Returns
TypeDescription
string | number

{string} A string representing the folder.

matchOrganizationFromOrganizationSettingNameName(organizationSettingNameName)

matchOrganizationFromOrganizationSettingNameName(organizationSettingNameName: string): string | number;

Parse the organization from OrganizationSettingName resource.

Parameter
NameDescription
organizationSettingNameName string

A fully-qualified path representing organization_setting_name resource.

Returns
TypeDescription
string | number

{string} A string representing the organization.

matchProjectNumberFromProjectNumberSettingNameName(projectNumberSettingNameName)

matchProjectNumberFromProjectNumberSettingNameName(projectNumberSettingNameName: string): string | number;

Parse the project_number from ProjectNumberSettingName resource.

Parameter
NameDescription
projectNumberSettingNameName string

A fully-qualified path representing project_number_setting_name resource.

Returns
TypeDescription
string | number

{string} A string representing the project_number.

matchSettingNameFromFolderSettingNameName(folderSettingNameName)

matchSettingNameFromFolderSettingNameName(folderSettingNameName: string): string | number;

Parse the setting_name from FolderSettingName resource.

Parameter
NameDescription
folderSettingNameName string

A fully-qualified path representing folder_setting_name resource.

Returns
TypeDescription
string | number

{string} A string representing the setting_name.

matchSettingNameFromOrganizationSettingNameName(organizationSettingNameName)

matchSettingNameFromOrganizationSettingNameName(organizationSettingNameName: string): string | number;

Parse the setting_name from OrganizationSettingName resource.

Parameter
NameDescription
organizationSettingNameName string

A fully-qualified path representing organization_setting_name resource.

Returns
TypeDescription
string | number

{string} A string representing the setting_name.

matchSettingNameFromProjectNumberSettingNameName(projectNumberSettingNameName)

matchSettingNameFromProjectNumberSettingNameName(projectNumberSettingNameName: string): string | number;

Parse the setting_name from ProjectNumberSettingName resource.

Parameter
NameDescription
projectNumberSettingNameName string

A fully-qualified path representing project_number_setting_name resource.

Returns
TypeDescription
string | number

{string} A string representing the setting_name.

organizationSettingNamePath(organization, settingName)

organizationSettingNamePath(organization: string, settingName: string): string;

Return a fully-qualified organizationSettingName resource name string.

Parameters
NameDescription
organization string
settingName string
Returns
TypeDescription
string

{string} Resource name string.

projectNumberSettingNamePath(projectNumber, settingName)

projectNumberSettingNamePath(projectNumber: string, settingName: string): string;

Return a fully-qualified projectNumberSettingName resource name string.

Parameters
NameDescription
projectNumber string
settingName string
Returns
TypeDescription
string

{string} Resource name string.

updateSetting(request, options)

updateSetting(request?: protos.google.cloud.resourcesettings.v1.IUpdateSettingRequest, options?: CallOptions): Promise<[
        protos.google.cloud.resourcesettings.v1.ISetting,
        protos.google.cloud.resourcesettings.v1.IUpdateSettingRequest | undefined,
        {} | undefined
    ]>;
Parameters
NameDescription
request protos.google.cloud.resourcesettings.v1.IUpdateSettingRequest
options CallOptions
Returns
TypeDescription
Promise<[ protos.google.cloud.resourcesettings.v1.ISetting, protos.google.cloud.resourcesettings.v1.IUpdateSettingRequest | undefined, {} | undefined ]>

updateSetting(request, options, callback)

updateSetting(request: protos.google.cloud.resourcesettings.v1.IUpdateSettingRequest, options: CallOptions, callback: Callback<protos.google.cloud.resourcesettings.v1.ISetting, protos.google.cloud.resourcesettings.v1.IUpdateSettingRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.resourcesettings.v1.IUpdateSettingRequest
options CallOptions
callback Callback<protos.google.cloud.resourcesettings.v1.ISetting, protos.google.cloud.resourcesettings.v1.IUpdateSettingRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateSetting(request, callback)

updateSetting(request: protos.google.cloud.resourcesettings.v1.IUpdateSettingRequest, callback: Callback<protos.google.cloud.resourcesettings.v1.ISetting, protos.google.cloud.resourcesettings.v1.IUpdateSettingRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.resourcesettings.v1.IUpdateSettingRequest
callback Callback<protos.google.cloud.resourcesettings.v1.ISetting, protos.google.cloud.resourcesettings.v1.IUpdateSettingRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void