AWS Classic

Pulumi Official
Package maintained by Pulumi
v5.4.0 published on Wednesday, May 4, 2022 by Pulumi

getApplication

Use this data source to get information about an AWS Serverless Application Repository application. For example, this can be used to determine the required capabilities for an application.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var exampleApplication = Output.Create(Aws.ServerlessRepository.GetApplication.InvokeAsync(new Aws.ServerlessRepository.GetApplicationArgs
        {
            ApplicationId = "arn:aws:serverlessrepo:us-east-1:123456789012:applications/ExampleApplication",
        }));
        var exampleCloudFormationStack = new Aws.ServerlessRepository.CloudFormationStack("exampleCloudFormationStack", new Aws.ServerlessRepository.CloudFormationStackArgs
        {
            ApplicationId = exampleApplication.Apply(exampleApplication => exampleApplication.ApplicationId),
            SemanticVersion = exampleApplication.Apply(exampleApplication => exampleApplication.SemanticVersion),
            Capabilities = exampleApplication.Apply(exampleApplication => exampleApplication.RequiredCapabilities),
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/serverlessrepository"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		exampleApplication, err := serverlessrepository.GetApplication(ctx, &serverlessrepository.GetApplicationArgs{
			ApplicationId: "arn:aws:serverlessrepo:us-east-1:123456789012:applications/ExampleApplication",
		}, nil)
		if err != nil {
			return err
		}
		_, err = serverlessrepository.NewCloudFormationStack(ctx, "exampleCloudFormationStack", &serverlessrepository.CloudFormationStackArgs{
			ApplicationId:   pulumi.String(exampleApplication.ApplicationId),
			SemanticVersion: pulumi.String(exampleApplication.SemanticVersion),
			Capabilities:    interface{}(exampleApplication.RequiredCapabilities),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var exampleApplication = Output.of(ServerlessrepositoryFunctions.getApplication(GetApplicationArgs.builder()
            .applicationId("arn:aws:serverlessrepo:us-east-1:123456789012:applications/ExampleApplication")
            .build()));

        var exampleCloudFormationStack = new CloudFormationStack("exampleCloudFormationStack", CloudFormationStackArgs.builder()        
            .applicationId(exampleApplication.apply(getApplicationResult -> getApplicationResult.getApplicationId()))
            .semanticVersion(exampleApplication.apply(getApplicationResult -> getApplicationResult.getSemanticVersion()))
            .capabilities(exampleApplication.apply(getApplicationResult -> getApplicationResult.getRequiredCapabilities()))
            .build());

        }
}
import pulumi
import pulumi_aws as aws

example_application = aws.serverlessrepository.get_application(application_id="arn:aws:serverlessrepo:us-east-1:123456789012:applications/ExampleApplication")
example_cloud_formation_stack = aws.serverlessrepository.CloudFormationStack("exampleCloudFormationStack",
    application_id=example_application.application_id,
    semantic_version=example_application.semantic_version,
    capabilities=example_application.required_capabilities)
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const exampleApplication = aws.serverlessrepository.getApplication({
    applicationId: "arn:aws:serverlessrepo:us-east-1:123456789012:applications/ExampleApplication",
});
const exampleCloudFormationStack = new aws.serverlessrepository.CloudFormationStack("exampleCloudFormationStack", {
    applicationId: exampleApplication.then(exampleApplication => exampleApplication.applicationId),
    semanticVersion: exampleApplication.then(exampleApplication => exampleApplication.semanticVersion),
    capabilities: exampleApplication.then(exampleApplication => exampleApplication.requiredCapabilities),
});
resources:
  exampleCloudFormationStack:
    type: aws:serverlessrepository:CloudFormationStack
    properties:
      applicationId: ${exampleApplication.applicationId}
      semanticVersion: ${exampleApplication.semanticVersion}
      capabilities: ${exampleApplication.requiredCapabilities}
variables:
  exampleApplication:
    Fn::Invoke:
      Function: aws:serverlessrepository:getApplication
      Arguments:
        applicationId: arn:aws:serverlessrepo:us-east-1:123456789012:applications/ExampleApplication

Using getApplication

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getApplication(args: GetApplicationArgs, opts?: InvokeOptions): Promise<GetApplicationResult>
function getApplicationOutput(args: GetApplicationOutputArgs, opts?: InvokeOptions): Output<GetApplicationResult>
def get_application(application_id: Optional[str] = None,
                    semantic_version: Optional[str] = None,
                    opts: Optional[InvokeOptions] = None) -> GetApplicationResult
def get_application_output(application_id: Optional[pulumi.Input[str]] = None,
                    semantic_version: Optional[pulumi.Input[str]] = None,
                    opts: Optional[InvokeOptions] = None) -> Output[GetApplicationResult]
func GetApplication(ctx *Context, args *GetApplicationArgs, opts ...InvokeOption) (*GetApplicationResult, error)
func GetApplicationOutput(ctx *Context, args *GetApplicationOutputArgs, opts ...InvokeOption) GetApplicationResultOutput

> Note: This function is named GetApplication in the Go SDK.

public static class GetApplication 
{
    public static Task<GetApplicationResult> InvokeAsync(GetApplicationArgs args, InvokeOptions? opts = null)
    public static Output<GetApplicationResult> Invoke(GetApplicationInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetApplicationResult> getApplication(GetApplicationArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: aws:serverlessrepository/getApplication:getApplication
  Arguments:
    # Arguments dictionary

The following arguments are supported:

ApplicationId string

The ARN of the application.

SemanticVersion string

The requested version of the application. By default, retrieves the latest version.

ApplicationId string

The ARN of the application.

SemanticVersion string

The requested version of the application. By default, retrieves the latest version.

applicationId String

The ARN of the application.

semanticVersion String

The requested version of the application. By default, retrieves the latest version.

applicationId string

The ARN of the application.

semanticVersion string

The requested version of the application. By default, retrieves the latest version.

application_id str

The ARN of the application.

semantic_version str

The requested version of the application. By default, retrieves the latest version.

applicationId String

The ARN of the application.

semanticVersion String

The requested version of the application. By default, retrieves the latest version.

getApplication Result

The following output properties are available:

ApplicationId string

The ARN of the application.

Id string

The provider-assigned unique ID for this managed resource.

Name string

The name of the application.

RequiredCapabilities List<string>

A list of capabilities describing the permissions needed to deploy the application.

SemanticVersion string
SourceCodeUrl string

A URL pointing to the source code of the application version.

TemplateUrl string

A URL pointing to the Cloud Formation template for the application version.

ApplicationId string

The ARN of the application.

Id string

The provider-assigned unique ID for this managed resource.

Name string

The name of the application.

RequiredCapabilities []string

A list of capabilities describing the permissions needed to deploy the application.

SemanticVersion string
SourceCodeUrl string

A URL pointing to the source code of the application version.

TemplateUrl string

A URL pointing to the Cloud Formation template for the application version.

applicationId String

The ARN of the application.

id String

The provider-assigned unique ID for this managed resource.

name String

The name of the application.

requiredCapabilities List

A list of capabilities describing the permissions needed to deploy the application.

semanticVersion String
sourceCodeUrl String

A URL pointing to the source code of the application version.

templateUrl String

A URL pointing to the Cloud Formation template for the application version.

applicationId string

The ARN of the application.

id string

The provider-assigned unique ID for this managed resource.

name string

The name of the application.

requiredCapabilities string[]

A list of capabilities describing the permissions needed to deploy the application.

semanticVersion string
sourceCodeUrl string

A URL pointing to the source code of the application version.

templateUrl string

A URL pointing to the Cloud Formation template for the application version.

application_id str

The ARN of the application.

id str

The provider-assigned unique ID for this managed resource.

name str

The name of the application.

required_capabilities Sequence[str]

A list of capabilities describing the permissions needed to deploy the application.

semantic_version str
source_code_url str

A URL pointing to the source code of the application version.

template_url str

A URL pointing to the Cloud Formation template for the application version.

applicationId String

The ARN of the application.

id String

The provider-assigned unique ID for this managed resource.

name String

The name of the application.

requiredCapabilities List

A list of capabilities describing the permissions needed to deploy the application.

semanticVersion String
sourceCodeUrl String

A URL pointing to the source code of the application version.

templateUrl String

A URL pointing to the Cloud Formation template for the application version.

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes

This Pulumi package is based on the aws Terraform Provider.