Creates a RuleFile with the given name
and source. Throws an error if any of the arguments are invalid. This is a local
operation, and does not involve any network API calls.
Name to assign to the rules file. This is usually a short file name that helps identify the file in a ruleset.
Contents of the rules file.
A new rules file instance.
Deletes the Ruleset identified by the given
name. The input name should be the short name string without the project ID
prefix. For example, to delete the projects/project-id/rulesets/my-ruleset,
pass the short name "my-ruleset". Rejects with a not-found error if the
specified Ruleset cannot be found.
Name of the Ruleset to delete.
A promise that fulfills when the Ruleset is deleted.
Gets the Ruleset identified by the given
name. The input name should be the short name string without the project ID
prefix. For example, to retrieve the projects/project-id/rulesets/my-ruleset,
pass the short name "my-ruleset". Rejects with a not-found error if the
specified Ruleset cannot be found.
Name of the Ruleset to retrieve.
A promise that fulfills with the specified Ruleset.
Gets the Ruleset currently applied to a
Cloud Storage bucket. Rejects with a not-found error if no ruleset is applied
on the bucket.
Optional name of the Cloud Storage bucket to be retrieved. If not
specified, retrieves the ruleset applied on the default bucket configured via
AppOptions.
A promise that fulfills with the Cloud Storage ruleset.
Retrieves a page of ruleset metadata.
The page size, 100 if undefined. This is also the maximum allowed limit.
The next page token. If not specified, returns rulesets starting without any offset.
A promise that fulfills with a page of rulesets.
Applies the specified Ruleset ruleset
to Cloud Firestore.
Name of the ruleset to apply or a RulesetMetadata object
containing the name.
A promise that fulfills when the ruleset is released.
Applies the specified Ruleset ruleset
to a Cloud Storage bucket.
Name of the ruleset to apply or a RulesetMetadata object
containing the name.
Optional name of the Cloud Storage bucket to apply the rules on. If
not specified, applies the ruleset on the default bucket configured via
AppOptions.
A promise that fulfills when the ruleset is released.
Creates a new Ruleset from the given
source, and applies it to a Cloud Storage bucket.
Rules source to apply.
Optional name of the Cloud Storage bucket to apply the rules on. If
not specified, applies the ruleset on the default bucket configured via
AppOptions.
A promise that fulfills when the ruleset is created and released.
Generated using TypeDoc
The Firebase
SecurityRulesservice interface.Do not call this constructor directly. Instead, use
admin.securityRules().