import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Creates an app associated with a developer. * This API associates the developer app with the specified API product * and auto-generates an API key for the app to use in calls to API proxies * inside that API product. * * To get more information about DeveloperApp, see: * * * [API documentation](https://cloud.google.com/apigee/docs/reference/apis/apigee/rest/v1/organizations.developers.apps) * * How-to Guides * * [Creating a developer](https://cloud.google.com/apigee/docs/api-platform/publish/creating-apps-surface-your-api) * * ## Example Usage * * ### Apigee Developer App Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const apigeeOrg = new gcp.apigee.Organization("apigee_org", { * analyticsRegion: "us-central1", * projectId: projectGoogleProject.projectId, * disableVpcPeering: true, * }); * const apigeeInstance = new gcp.apigee.Instance("apigee_instance", { * name: "instance", * location: "us-central1", * orgId: apigeeOrg.id, * }); * const apiProduct = new gcp.apigee.ApiProduct("api_product", { * orgId: apigeeOrg.id, * name: "sample-api", * displayName: "A sample API Product", * approvalType: "auto", * scopes: [ * "read:weather", * "write:reports", * ], * }, { * dependsOn: [apigeeInstance], * }); * const developer = new gcp.apigee.Developer("developer", { * email: "john.doe@acme.com", * firstName: "John", * lastName: "Doe", * userName: "john.doe", * orgId: apigeeOrg.id, * }, { * dependsOn: [apigeeInstance], * }); * const apigeeDeveloperApp = new gcp.apigee.DeveloperApp("apigee_developer_app", { * name: "sample-app", * orgId: apigeeOrg.id, * developerId: developer.id, * developerEmail: developer.email, * callbackUrl: "https://example-call.url", * apiProducts: [apiProduct.name], * scopes: apiProduct.scopes, * }); * const project = gcp.organizations.getProject({}); * ``` * ### Apigee Developer App Basic Test * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * import * as time from "@pulumiverse/time"; * * const project = new gcp.organizations.Project("project", { * projectId: "prj", * name: "prj", * orgId: "123456789", * billingAccount: "000000-0000000-0000000-000000", * deletionPolicy: "DELETE", * }); * const wait60Seconds = new time.Sleep("wait_60_seconds", {createDuration: "60s"}, { * dependsOn: [project], * }); * const apigee = new gcp.projects.Service("apigee", { * project: project.projectId, * service: "apigee.googleapis.com", * }, { * dependsOn: [wait60Seconds], * }); * const apigeeOrg = new gcp.apigee.Organization("apigee_org", { * analyticsRegion: "us-central1", * projectId: project.projectId, * disableVpcPeering: true, * }, { * dependsOn: [apigee], * }); * const apigeeInstance = new gcp.apigee.Instance("apigee_instance", { * name: "instance", * location: "us-central1", * orgId: apigeeOrg.id, * }); * const apiProduct = new gcp.apigee.ApiProduct("api_product", { * name: "sample-api", * orgId: apigeeOrg.id, * displayName: "A sample API Product", * approvalType: "auto", * scopes: [ * "read:weather", * "write:reports", * "write:files", * ], * }, { * dependsOn: [apigeeInstance], * }); * const developer = new gcp.apigee.Developer("developer", { * email: "john.doe@acme.com", * firstName: "John", * lastName: "Doe", * userName: "john.doe", * orgId: apigeeOrg.id, * }, { * dependsOn: [apigeeInstance], * }); * const apigeeDeveloperApp = new gcp.apigee.DeveloperApp("apigee_developer_app", { * name: "sample-app", * appFamily: "default", * developerEmail: developer.email, * orgId: apigeeOrg.id, * callbackUrl: "https://example-call.url", * keyExpiresIn: "-1", * status: "approved", * apiProducts: [apiProduct.name], * scopes: apiProduct.scopes, * attributes: [{ * name: "sample_name", * value: "sample_value", * }], * }); * ``` * * ## Import * * DeveloperApp can be imported using any of these accepted formats: * * * `{{org_id}}/developers/{{developer_email}}/apps/{{name}}` * * * `{{org_id}}/{{developer_email}}/{{name}}` * * When using the `pulumi import` command, DeveloperApp can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:apigee/developerApp:DeveloperApp default {{org_id}}/developers/{{developer_email}}/apps/{{name}} * ``` * * ```sh * $ pulumi import gcp:apigee/developerApp:DeveloperApp default {{org_id}}/{{developer_email}}/{{name}} * ``` */ export declare class DeveloperApp extends pulumi.CustomResource { /** * Get an existing DeveloperApp 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, state?: DeveloperAppState, opts?: pulumi.CustomResourceOptions): DeveloperApp; /** * Returns true if the given object is an instance of DeveloperApp. 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 DeveloperApp; /** * List of API products associated with the developer app. */ readonly apiProducts: pulumi.Output; /** * Developer app family. */ readonly appFamily: pulumi.Output; /** * ID of the developer app. This ID is not user specified but is * automatically generated on app creation. appId is a UUID. */ readonly appId: pulumi.Output; /** * Developer attributes (name/value pairs). The custom attribute limit is 18. * Structure is documented below. */ readonly attributes: pulumi.Output; /** * Callback URL used by OAuth 2.0 authorization servers to communicate * authorization codes back to developer apps. */ readonly callbackUrl: pulumi.Output; /** * Time at which the developer was created in milliseconds since epoch. */ readonly createdAt: pulumi.Output; /** * Output only. Set of credentials for the developer app consisting of * the consumer key/secret pairs associated with the API products. * Structure is documented below. */ readonly credentials: pulumi.Output; /** * Email address of the developer. * This value is used to uniquely identify the developer in Apigee hybrid. * Note that the email address has to be in lowercase only. */ readonly developerEmail: pulumi.Output; /** * ID of the developer. */ readonly developerId: pulumi.Output; /** * Expiration time, in milliseconds, for the consumer key that is generated * for the developer app. If not set or left to the default value of -1, * the API key never expires. The expiration time can't be updated after it is set. */ readonly keyExpiresIn: pulumi.Output; /** * Time at which the developer was last modified in milliseconds since epoch. */ readonly lastModifiedAt: pulumi.Output; /** * Name of the developer app. */ readonly name: pulumi.Output; /** * The Apigee Organization associated with the Apigee instance, * in the format `organizations/{{org_name}}`. */ readonly orgId: pulumi.Output; /** * Scopes to apply to the developer app. * The specified scopes must already exist for the API product that * you associate with the developer app. */ readonly scopes: pulumi.Output; /** * Status of the credential. Valid values include approved or revoked. */ readonly status: pulumi.Output; /** * Create a DeveloperApp 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: DeveloperAppArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering DeveloperApp resources. */ export interface DeveloperAppState { /** * List of API products associated with the developer app. */ apiProducts?: pulumi.Input[]>; /** * Developer app family. */ appFamily?: pulumi.Input; /** * ID of the developer app. This ID is not user specified but is * automatically generated on app creation. appId is a UUID. */ appId?: pulumi.Input; /** * Developer attributes (name/value pairs). The custom attribute limit is 18. * Structure is documented below. */ attributes?: pulumi.Input[]>; /** * Callback URL used by OAuth 2.0 authorization servers to communicate * authorization codes back to developer apps. */ callbackUrl?: pulumi.Input; /** * Time at which the developer was created in milliseconds since epoch. */ createdAt?: pulumi.Input; /** * Output only. Set of credentials for the developer app consisting of * the consumer key/secret pairs associated with the API products. * Structure is documented below. */ credentials?: pulumi.Input[]>; /** * Email address of the developer. * This value is used to uniquely identify the developer in Apigee hybrid. * Note that the email address has to be in lowercase only. */ developerEmail?: pulumi.Input; /** * ID of the developer. */ developerId?: pulumi.Input; /** * Expiration time, in milliseconds, for the consumer key that is generated * for the developer app. If not set or left to the default value of -1, * the API key never expires. The expiration time can't be updated after it is set. */ keyExpiresIn?: pulumi.Input; /** * Time at which the developer was last modified in milliseconds since epoch. */ lastModifiedAt?: pulumi.Input; /** * Name of the developer app. */ name?: pulumi.Input; /** * The Apigee Organization associated with the Apigee instance, * in the format `organizations/{{org_name}}`. */ orgId?: pulumi.Input; /** * Scopes to apply to the developer app. * The specified scopes must already exist for the API product that * you associate with the developer app. */ scopes?: pulumi.Input[]>; /** * Status of the credential. Valid values include approved or revoked. */ status?: pulumi.Input; } /** * The set of arguments for constructing a DeveloperApp resource. */ export interface DeveloperAppArgs { /** * List of API products associated with the developer app. */ apiProducts?: pulumi.Input[]>; /** * Developer app family. */ appFamily?: pulumi.Input; /** * Developer attributes (name/value pairs). The custom attribute limit is 18. * Structure is documented below. */ attributes?: pulumi.Input[]>; /** * Callback URL used by OAuth 2.0 authorization servers to communicate * authorization codes back to developer apps. */ callbackUrl: pulumi.Input; /** * Email address of the developer. * This value is used to uniquely identify the developer in Apigee hybrid. * Note that the email address has to be in lowercase only. */ developerEmail: pulumi.Input; /** * Expiration time, in milliseconds, for the consumer key that is generated * for the developer app. If not set or left to the default value of -1, * the API key never expires. The expiration time can't be updated after it is set. */ keyExpiresIn?: pulumi.Input; /** * Name of the developer app. */ name?: pulumi.Input; /** * The Apigee Organization associated with the Apigee instance, * in the format `organizations/{{org_name}}`. */ orgId: pulumi.Input; /** * Scopes to apply to the developer app. * The specified scopes must already exist for the API product that * you associate with the developer app. */ scopes?: pulumi.Input[]>; /** * Status of the credential. Valid values include approved or revoked. */ status?: pulumi.Input; }