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
Name | Description |
opts |
ClientOptions
|
Properties
apiEndpoint
static get apiEndpoint(): string;
The DNS address for this API service - same as servicePath(), exists for compatibility reasons.
Property Value
auth
Property Value
Type | Description |
gax.GoogleAuth | |
descriptors
descriptors: Descriptors;
Property Value
Type | Description |
Descriptors | |
innerApiCalls
innerApiCalls: {
[name: string]: Function;
};
Property Value
Type | Description |
{
[name: string]: Function;
} | |
pathTemplates
pathTemplates: {
[name: string]: gax.PathTemplate;
};
Property Value
Type | Description |
{
[name: string]: gax.PathTemplate;
} | |
port
static get port(): number;
The port for this API service.
Property Value
resourceSettingsServiceStub
resourceSettingsServiceStub?: Promise<{
[name: string]: Function;
}>;
Property Value
Type | Description |
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
servicePath
static get servicePath(): string;
The DNS address for this API service.
Property Value
warn
warn: (code: string, message: string, warnType?: string) => void;
Property Value
Type | Description |
(code: string, message: string, warnType?: string) => void | |
Methods
close()
Terminate the gRPC channel and close the client.
The client will no longer be usable and all future behavior is undefined.
Returns
Type | Description |
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
Name | Description |
folder |
string
|
settingName |
string
|
Returns
Type | Description |
string | {string} Resource name string.
|
getProjectId()
getProjectId(): Promise<string>;
Returns
Type | Description |
Promise<string> | |
getProjectId(callback)
getProjectId(callback: Callback<string, undefined, undefined>): void;
Parameter
Name | Description |
callback |
Callback<string, undefined, undefined>
|
Returns
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
Name | Description |
request |
protos.google.cloud.resourcesettings.v1.IGetSettingRequest
|
options |
CallOptions
|
Returns
Type | Description |
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
Name | Description |
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
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
Name | Description |
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
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
Type | Description |
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
Name | Description |
request |
protos.google.cloud.resourcesettings.v1.IListSettingsRequest
|
options |
CallOptions
|
Returns
Type | Description |
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
Name | Description |
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
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
Name | Description |
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
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
Name | Description |
request |
protos.google.cloud.resourcesettings.v1.IListSettingsRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
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
Name | Description |
request |
protos.google.cloud.resourcesettings.v1.IListSettingsRequest
The request object that will be sent.
|
options |
CallOptions
Call options. See CallOptions for more details.
|
Returns
Type | Description |
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
Name | Description |
folderSettingNameName |
string
A fully-qualified path representing folder_setting_name resource.
|
Returns
Type | Description |
string | number | {string} A string representing the folder.
|
matchOrganizationFromOrganizationSettingNameName(organizationSettingNameName)
matchOrganizationFromOrganizationSettingNameName(organizationSettingNameName: string): string | number;
Parse the organization from OrganizationSettingName resource.
Parameter
Name | Description |
organizationSettingNameName |
string
A fully-qualified path representing organization_setting_name resource.
|
Returns
Type | Description |
string | number | {string} A string representing the organization.
|
matchProjectNumberFromProjectNumberSettingNameName(projectNumberSettingNameName)
matchProjectNumberFromProjectNumberSettingNameName(projectNumberSettingNameName: string): string | number;
Parse the project_number from ProjectNumberSettingName resource.
Parameter
Name | Description |
projectNumberSettingNameName |
string
A fully-qualified path representing project_number_setting_name resource.
|
Returns
Type | Description |
string | number | {string} A string representing the project_number.
|
matchSettingNameFromFolderSettingNameName(folderSettingNameName)
matchSettingNameFromFolderSettingNameName(folderSettingNameName: string): string | number;
Parse the setting_name from FolderSettingName resource.
Parameter
Name | Description |
folderSettingNameName |
string
A fully-qualified path representing folder_setting_name resource.
|
Returns
Type | Description |
string | number | {string} A string representing the setting_name.
|
matchSettingNameFromOrganizationSettingNameName(organizationSettingNameName)
matchSettingNameFromOrganizationSettingNameName(organizationSettingNameName: string): string | number;
Parse the setting_name from OrganizationSettingName resource.
Parameter
Name | Description |
organizationSettingNameName |
string
A fully-qualified path representing organization_setting_name resource.
|
Returns
Type | Description |
string | number | {string} A string representing the setting_name.
|
matchSettingNameFromProjectNumberSettingNameName(projectNumberSettingNameName)
matchSettingNameFromProjectNumberSettingNameName(projectNumberSettingNameName: string): string | number;
Parse the setting_name from ProjectNumberSettingName resource.
Parameter
Name | Description |
projectNumberSettingNameName |
string
A fully-qualified path representing project_number_setting_name resource.
|
Returns
Type | Description |
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
Name | Description |
organization |
string
|
settingName |
string
|
Returns
Type | Description |
string | {string} Resource name string.
|
projectNumberSettingNamePath(projectNumber, settingName)
projectNumberSettingNamePath(projectNumber: string, settingName: string): string;
Return a fully-qualified projectNumberSettingName resource name string.
Parameters
Name | Description |
projectNumber |
string
|
settingName |
string
|
Returns
Type | Description |
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
Name | Description |
request |
protos.google.cloud.resourcesettings.v1.IUpdateSettingRequest
|
options |
CallOptions
|
Returns
Type | Description |
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
Name | Description |
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
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
Name | Description |
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