@pulumi/fastly
Version:
A Pulumi package for creating and managing fastly cloud resources.. Based on terraform-provider-fastly: version v4
112 lines (111 loc) • 3.92 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Configures authorization with granular permissions to services. Users can be granted rights for services on different levels.
*
* The Service Authorization resource requires a user id, service id and an optional permission.
*
* ## Example Usage
*
* Basic usage:
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as fastly from "@pulumi/fastly";
*
* const demo = new fastly.ServiceVcl("demo", {
* name: "demofastly",
* domains: [{
* name: "demo.notexample.com",
* comment: "demo",
* }],
* });
* const user = new fastly.User("user", {
* login: "demo@example.com",
* name: "Demo User",
* });
* const auth = new fastly.ServiceAuthorization("auth", {
* serviceId: demo.id,
* userId: user.id,
* permission: "purge_all",
* });
* ```
*
* ## Import
*
* A Fastly Service Authorization can be imported using their user ID, e.g.
*
* ```sh
* $ pulumi import fastly:index/serviceAuthorization:ServiceAuthorization demo xxxxxxxxxxxxxxxxxxxx
* ```
*/
export declare class ServiceAuthorization extends pulumi.CustomResource {
/**
* Get an existing ServiceAuthorization resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ServiceAuthorizationState, opts?: pulumi.CustomResourceOptions): ServiceAuthorization;
/**
* Returns true if the given object is an instance of ServiceAuthorization. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is ServiceAuthorization;
/**
* The permissions to grant the user. Can be `full`, `readOnly`, `purgeSelect` or `purgeAll`.
*/
readonly permission: pulumi.Output<string>;
/**
* The ID of the service to grant permissions for.
*/
readonly serviceId: pulumi.Output<string>;
/**
* The ID of the user which will receive the granted permissions.
*/
readonly userId: pulumi.Output<string>;
/**
* Create a ServiceAuthorization resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: ServiceAuthorizationArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering ServiceAuthorization resources.
*/
export interface ServiceAuthorizationState {
/**
* The permissions to grant the user. Can be `full`, `readOnly`, `purgeSelect` or `purgeAll`.
*/
permission?: pulumi.Input<string>;
/**
* The ID of the service to grant permissions for.
*/
serviceId?: pulumi.Input<string>;
/**
* The ID of the user which will receive the granted permissions.
*/
userId?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a ServiceAuthorization resource.
*/
export interface ServiceAuthorizationArgs {
/**
* The permissions to grant the user. Can be `full`, `readOnly`, `purgeSelect` or `purgeAll`.
*/
permission: pulumi.Input<string>;
/**
* The ID of the service to grant permissions for.
*/
serviceId: pulumi.Input<string>;
/**
* The ID of the user which will receive the granted permissions.
*/
userId: pulumi.Input<string>;
}