1. Packages
  2. Flexibleengine Provider
  3. API Docs
  4. ApigApplicationAuthorization
flexibleengine 1.46.0 published on Monday, Apr 14, 2025 by flexibleenginecloud

flexibleengine.ApigApplicationAuthorization

Explore with Pulumi AI

flexibleengine logo
flexibleengine 1.46.0 published on Monday, Apr 14, 2025 by flexibleenginecloud

    Using this resource to authorize APIs for application, allowing it to access the published APIs within FlexibleEngine.

    For an application, an environment can only create one flexibleengine.ApigApplicationAuthorization resource (all published APIs must belong to an environment).

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as flexibleengine from "@pulumi/flexibleengine";
    
    const config = new pulumi.Config();
    const instanceId = config.requireObject("instanceId");
    const applicationId = config.requireObject("applicationId");
    const publishedEnvId = config.requireObject("publishedEnvId");
    const publishedApiIds = config.requireObject<Array<string>>("publishedApiIds");
    const test = new flexibleengine.ApigApplicationAuthorization("test", {
        instanceId: instanceId,
        applicationId: applicationId,
        envId: publishedEnvId,
        apiIds: publishedApiIds,
    });
    
    import pulumi
    import pulumi_flexibleengine as flexibleengine
    
    config = pulumi.Config()
    instance_id = config.require_object("instanceId")
    application_id = config.require_object("applicationId")
    published_env_id = config.require_object("publishedEnvId")
    published_api_ids = config.require_object("publishedApiIds")
    test = flexibleengine.ApigApplicationAuthorization("test",
        instance_id=instance_id,
        application_id=application_id,
        env_id=published_env_id,
        api_ids=published_api_ids)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/flexibleengine/flexibleengine"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		instanceId := cfg.RequireObject("instanceId")
    		applicationId := cfg.RequireObject("applicationId")
    		publishedEnvId := cfg.RequireObject("publishedEnvId")
    		publishedApiIds := cfg.Require("publishedApiIds")
    		_, err := flexibleengine.NewApigApplicationAuthorization(ctx, "test", &flexibleengine.ApigApplicationAuthorizationArgs{
    			InstanceId:    pulumi.Any(instanceId),
    			ApplicationId: pulumi.Any(applicationId),
    			EnvId:         pulumi.Any(publishedEnvId),
    			ApiIds:        publishedApiIds,
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Flexibleengine = Pulumi.Flexibleengine;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var instanceId = config.RequireObject<dynamic>("instanceId");
        var applicationId = config.RequireObject<dynamic>("applicationId");
        var publishedEnvId = config.RequireObject<dynamic>("publishedEnvId");
        var publishedApiIds = config.RequireObject<string[]>("publishedApiIds");
        var test = new Flexibleengine.ApigApplicationAuthorization("test", new()
        {
            InstanceId = instanceId,
            ApplicationId = applicationId,
            EnvId = publishedEnvId,
            ApiIds = publishedApiIds,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.flexibleengine.ApigApplicationAuthorization;
    import com.pulumi.flexibleengine.ApigApplicationAuthorizationArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var config = ctx.config();
            final var instanceId = config.get("instanceId");
            final var applicationId = config.get("applicationId");
            final var publishedEnvId = config.get("publishedEnvId");
            final var publishedApiIds = config.get("publishedApiIds");
            var test = new ApigApplicationAuthorization("test", ApigApplicationAuthorizationArgs.builder()
                .instanceId(instanceId)
                .applicationId(applicationId)
                .envId(publishedEnvId)
                .apiIds(publishedApiIds)
                .build());
    
        }
    }
    
    configuration:
      instanceId:
        type: dynamic
      applicationId:
        type: dynamic
      publishedEnvId:
        type: dynamic
      publishedApiIds:
        type: list(string)
    resources:
      test:
        type: flexibleengine:ApigApplicationAuthorization
        properties:
          instanceId: ${instanceId}
          applicationId: ${applicationId}
          envId: ${publishedEnvId}
          apiIds: ${publishedApiIds}
    

    Create ApigApplicationAuthorization Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ApigApplicationAuthorization(name: string, args: ApigApplicationAuthorizationArgs, opts?: CustomResourceOptions);
    @overload
    def ApigApplicationAuthorization(resource_name: str,
                                     args: ApigApplicationAuthorizationArgs,
                                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def ApigApplicationAuthorization(resource_name: str,
                                     opts: Optional[ResourceOptions] = None,
                                     api_ids: Optional[Sequence[str]] = None,
                                     application_id: Optional[str] = None,
                                     env_id: Optional[str] = None,
                                     instance_id: Optional[str] = None,
                                     apig_application_authorization_id: Optional[str] = None,
                                     region: Optional[str] = None,
                                     timeouts: Optional[ApigApplicationAuthorizationTimeoutsArgs] = None)
    func NewApigApplicationAuthorization(ctx *Context, name string, args ApigApplicationAuthorizationArgs, opts ...ResourceOption) (*ApigApplicationAuthorization, error)
    public ApigApplicationAuthorization(string name, ApigApplicationAuthorizationArgs args, CustomResourceOptions? opts = null)
    public ApigApplicationAuthorization(String name, ApigApplicationAuthorizationArgs args)
    public ApigApplicationAuthorization(String name, ApigApplicationAuthorizationArgs args, CustomResourceOptions options)
    
    type: flexibleengine:ApigApplicationAuthorization
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args ApigApplicationAuthorizationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ApigApplicationAuthorizationArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ApigApplicationAuthorizationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ApigApplicationAuthorizationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ApigApplicationAuthorizationArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var apigApplicationAuthorizationResource = new Flexibleengine.ApigApplicationAuthorization("apigApplicationAuthorizationResource", new()
    {
        ApiIds = new[]
        {
            "string",
        },
        ApplicationId = "string",
        EnvId = "string",
        InstanceId = "string",
        ApigApplicationAuthorizationId = "string",
        Region = "string",
        Timeouts = new Flexibleengine.Inputs.ApigApplicationAuthorizationTimeoutsArgs
        {
            Create = "string",
            Delete = "string",
            Update = "string",
        },
    });
    
    example, err := flexibleengine.NewApigApplicationAuthorization(ctx, "apigApplicationAuthorizationResource", &flexibleengine.ApigApplicationAuthorizationArgs{
    	ApiIds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	ApplicationId:                  pulumi.String("string"),
    	EnvId:                          pulumi.String("string"),
    	InstanceId:                     pulumi.String("string"),
    	ApigApplicationAuthorizationId: pulumi.String("string"),
    	Region:                         pulumi.String("string"),
    	Timeouts: &flexibleengine.ApigApplicationAuthorizationTimeoutsArgs{
    		Create: pulumi.String("string"),
    		Delete: pulumi.String("string"),
    		Update: pulumi.String("string"),
    	},
    })
    
    var apigApplicationAuthorizationResource = new ApigApplicationAuthorization("apigApplicationAuthorizationResource", ApigApplicationAuthorizationArgs.builder()
        .apiIds("string")
        .applicationId("string")
        .envId("string")
        .instanceId("string")
        .apigApplicationAuthorizationId("string")
        .region("string")
        .timeouts(ApigApplicationAuthorizationTimeoutsArgs.builder()
            .create("string")
            .delete("string")
            .update("string")
            .build())
        .build());
    
    apig_application_authorization_resource = flexibleengine.ApigApplicationAuthorization("apigApplicationAuthorizationResource",
        api_ids=["string"],
        application_id="string",
        env_id="string",
        instance_id="string",
        apig_application_authorization_id="string",
        region="string",
        timeouts={
            "create": "string",
            "delete": "string",
            "update": "string",
        })
    
    const apigApplicationAuthorizationResource = new flexibleengine.ApigApplicationAuthorization("apigApplicationAuthorizationResource", {
        apiIds: ["string"],
        applicationId: "string",
        envId: "string",
        instanceId: "string",
        apigApplicationAuthorizationId: "string",
        region: "string",
        timeouts: {
            create: "string",
            "delete": "string",
            update: "string",
        },
    });
    
    type: flexibleengine:ApigApplicationAuthorization
    properties:
        apiIds:
            - string
        apigApplicationAuthorizationId: string
        applicationId: string
        envId: string
        instanceId: string
        region: string
        timeouts:
            create: string
            delete: string
            update: string
    

    ApigApplicationAuthorization Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The ApigApplicationAuthorization resource accepts the following input properties:

    ApiIds List<string>
    Specifies the authorized API IDs.
    ApplicationId string
    Specifies the ID of the application authorized to access the APIs. Changing this will create a new resource.
    EnvId string
    Specifies the environment ID where the APIs were published. Changing this will create a new resource.
    InstanceId string
    Specifies the ID of the dedicated instance to which the application and APIs belong. Changing this will create a new resource.
    ApigApplicationAuthorizationId string
    The resource ID, also <env_id>/<application_id>.
    Region string
    Specifies the region where the application and APIs are located.
    If omitted, the provider-level region will be used. Changing this will create a new resource.
    Timeouts ApigApplicationAuthorizationTimeouts
    ApiIds []string
    Specifies the authorized API IDs.
    ApplicationId string
    Specifies the ID of the application authorized to access the APIs. Changing this will create a new resource.
    EnvId string
    Specifies the environment ID where the APIs were published. Changing this will create a new resource.
    InstanceId string
    Specifies the ID of the dedicated instance to which the application and APIs belong. Changing this will create a new resource.
    ApigApplicationAuthorizationId string
    The resource ID, also <env_id>/<application_id>.
    Region string
    Specifies the region where the application and APIs are located.
    If omitted, the provider-level region will be used. Changing this will create a new resource.
    Timeouts ApigApplicationAuthorizationTimeoutsArgs
    apiIds List<String>
    Specifies the authorized API IDs.
    applicationId String
    Specifies the ID of the application authorized to access the APIs. Changing this will create a new resource.
    envId String
    Specifies the environment ID where the APIs were published. Changing this will create a new resource.
    instanceId String
    Specifies the ID of the dedicated instance to which the application and APIs belong. Changing this will create a new resource.
    apigApplicationAuthorizationId String
    The resource ID, also <env_id>/<application_id>.
    region String
    Specifies the region where the application and APIs are located.
    If omitted, the provider-level region will be used. Changing this will create a new resource.
    timeouts ApigApplicationAuthorizationTimeouts
    apiIds string[]
    Specifies the authorized API IDs.
    applicationId string
    Specifies the ID of the application authorized to access the APIs. Changing this will create a new resource.
    envId string
    Specifies the environment ID where the APIs were published. Changing this will create a new resource.
    instanceId string
    Specifies the ID of the dedicated instance to which the application and APIs belong. Changing this will create a new resource.
    apigApplicationAuthorizationId string
    The resource ID, also <env_id>/<application_id>.
    region string
    Specifies the region where the application and APIs are located.
    If omitted, the provider-level region will be used. Changing this will create a new resource.
    timeouts ApigApplicationAuthorizationTimeouts
    api_ids Sequence[str]
    Specifies the authorized API IDs.
    application_id str
    Specifies the ID of the application authorized to access the APIs. Changing this will create a new resource.
    env_id str
    Specifies the environment ID where the APIs were published. Changing this will create a new resource.
    instance_id str
    Specifies the ID of the dedicated instance to which the application and APIs belong. Changing this will create a new resource.
    apig_application_authorization_id str
    The resource ID, also <env_id>/<application_id>.
    region str
    Specifies the region where the application and APIs are located.
    If omitted, the provider-level region will be used. Changing this will create a new resource.
    timeouts ApigApplicationAuthorizationTimeoutsArgs
    apiIds List<String>
    Specifies the authorized API IDs.
    applicationId String
    Specifies the ID of the application authorized to access the APIs. Changing this will create a new resource.
    envId String
    Specifies the environment ID where the APIs were published. Changing this will create a new resource.
    instanceId String
    Specifies the ID of the dedicated instance to which the application and APIs belong. Changing this will create a new resource.
    apigApplicationAuthorizationId String
    The resource ID, also <env_id>/<application_id>.
    region String
    Specifies the region where the application and APIs are located.
    If omitted, the provider-level region will be used. Changing this will create a new resource.
    timeouts Property Map

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ApigApplicationAuthorization resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing ApigApplicationAuthorization Resource

    Get an existing ApigApplicationAuthorization resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: ApigApplicationAuthorizationState, opts?: CustomResourceOptions): ApigApplicationAuthorization
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            api_ids: Optional[Sequence[str]] = None,
            apig_application_authorization_id: Optional[str] = None,
            application_id: Optional[str] = None,
            env_id: Optional[str] = None,
            instance_id: Optional[str] = None,
            region: Optional[str] = None,
            timeouts: Optional[ApigApplicationAuthorizationTimeoutsArgs] = None) -> ApigApplicationAuthorization
    func GetApigApplicationAuthorization(ctx *Context, name string, id IDInput, state *ApigApplicationAuthorizationState, opts ...ResourceOption) (*ApigApplicationAuthorization, error)
    public static ApigApplicationAuthorization Get(string name, Input<string> id, ApigApplicationAuthorizationState? state, CustomResourceOptions? opts = null)
    public static ApigApplicationAuthorization get(String name, Output<String> id, ApigApplicationAuthorizationState state, CustomResourceOptions options)
    resources:  _:    type: flexibleengine:ApigApplicationAuthorization    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    ApiIds List<string>
    Specifies the authorized API IDs.
    ApigApplicationAuthorizationId string
    The resource ID, also <env_id>/<application_id>.
    ApplicationId string
    Specifies the ID of the application authorized to access the APIs. Changing this will create a new resource.
    EnvId string
    Specifies the environment ID where the APIs were published. Changing this will create a new resource.
    InstanceId string
    Specifies the ID of the dedicated instance to which the application and APIs belong. Changing this will create a new resource.
    Region string
    Specifies the region where the application and APIs are located.
    If omitted, the provider-level region will be used. Changing this will create a new resource.
    Timeouts ApigApplicationAuthorizationTimeouts
    ApiIds []string
    Specifies the authorized API IDs.
    ApigApplicationAuthorizationId string
    The resource ID, also <env_id>/<application_id>.
    ApplicationId string
    Specifies the ID of the application authorized to access the APIs. Changing this will create a new resource.
    EnvId string
    Specifies the environment ID where the APIs were published. Changing this will create a new resource.
    InstanceId string
    Specifies the ID of the dedicated instance to which the application and APIs belong. Changing this will create a new resource.
    Region string
    Specifies the region where the application and APIs are located.
    If omitted, the provider-level region will be used. Changing this will create a new resource.
    Timeouts ApigApplicationAuthorizationTimeoutsArgs
    apiIds List<String>
    Specifies the authorized API IDs.
    apigApplicationAuthorizationId String
    The resource ID, also <env_id>/<application_id>.
    applicationId String
    Specifies the ID of the application authorized to access the APIs. Changing this will create a new resource.
    envId String
    Specifies the environment ID where the APIs were published. Changing this will create a new resource.
    instanceId String
    Specifies the ID of the dedicated instance to which the application and APIs belong. Changing this will create a new resource.
    region String
    Specifies the region where the application and APIs are located.
    If omitted, the provider-level region will be used. Changing this will create a new resource.
    timeouts ApigApplicationAuthorizationTimeouts
    apiIds string[]
    Specifies the authorized API IDs.
    apigApplicationAuthorizationId string
    The resource ID, also <env_id>/<application_id>.
    applicationId string
    Specifies the ID of the application authorized to access the APIs. Changing this will create a new resource.
    envId string
    Specifies the environment ID where the APIs were published. Changing this will create a new resource.
    instanceId string
    Specifies the ID of the dedicated instance to which the application and APIs belong. Changing this will create a new resource.
    region string
    Specifies the region where the application and APIs are located.
    If omitted, the provider-level region will be used. Changing this will create a new resource.
    timeouts ApigApplicationAuthorizationTimeouts
    api_ids Sequence[str]
    Specifies the authorized API IDs.
    apig_application_authorization_id str
    The resource ID, also <env_id>/<application_id>.
    application_id str
    Specifies the ID of the application authorized to access the APIs. Changing this will create a new resource.
    env_id str
    Specifies the environment ID where the APIs were published. Changing this will create a new resource.
    instance_id str
    Specifies the ID of the dedicated instance to which the application and APIs belong. Changing this will create a new resource.
    region str
    Specifies the region where the application and APIs are located.
    If omitted, the provider-level region will be used. Changing this will create a new resource.
    timeouts ApigApplicationAuthorizationTimeoutsArgs
    apiIds List<String>
    Specifies the authorized API IDs.
    apigApplicationAuthorizationId String
    The resource ID, also <env_id>/<application_id>.
    applicationId String
    Specifies the ID of the application authorized to access the APIs. Changing this will create a new resource.
    envId String
    Specifies the environment ID where the APIs were published. Changing this will create a new resource.
    instanceId String
    Specifies the ID of the dedicated instance to which the application and APIs belong. Changing this will create a new resource.
    region String
    Specifies the region where the application and APIs are located.
    If omitted, the provider-level region will be used. Changing this will create a new resource.
    timeouts Property Map

    Supporting Types

    ApigApplicationAuthorizationTimeouts, ApigApplicationAuthorizationTimeoutsArgs

    Create string
    Delete string
    Update string
    Create string
    Delete string
    Update string
    create String
    delete String
    update String
    create string
    delete string
    update string
    create str
    delete str
    update str
    create String
    delete String
    update String

    Import

    Authorize relationships of application can be imported using related instance_id and their id (also consists of

    env_id and application_id), separated by the slashes, e.g.

    bash

    $ pulumi import flexibleengine:index/apigApplicationAuthorization:ApigApplicationAuthorization test <instance_id>/<env_id>/<application_id>
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    flexibleengine flexibleenginecloud/terraform-provider-flexibleengine
    License
    Notes
    This Pulumi package is based on the flexibleengine Terraform Provider.
    flexibleengine logo
    flexibleengine 1.46.0 published on Monday, Apr 14, 2025 by flexibleenginecloud