AWS v6.71.0 published on Friday, Mar 7, 2025 by Pulumi
aws.serverlessrepository.getApplication
Explore with Pulumi AI
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
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = aws.serverlessrepository.getApplication({
    applicationId: "arn:aws:serverlessrepo:us-east-1:123456789012:applications/ExampleApplication",
});
const exampleCloudFormationStack = new aws.serverlessrepository.CloudFormationStack("example", {
    name: "Example",
    applicationId: example.then(example => example.applicationId),
    semanticVersion: example.then(example => example.semanticVersion),
    capabilities: example.then(example => example.requiredCapabilities),
});
import pulumi
import pulumi_aws as aws
example = aws.serverlessrepository.get_application(application_id="arn:aws:serverlessrepo:us-east-1:123456789012:applications/ExampleApplication")
example_cloud_formation_stack = aws.serverlessrepository.CloudFormationStack("example",
    name="Example",
    application_id=example.application_id,
    semantic_version=example.semantic_version,
    capabilities=example.required_capabilities)
package main
import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/serverlessrepository"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, 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, "example", &serverlessrepository.CloudFormationStackArgs{
			Name:            pulumi.String("Example"),
			ApplicationId:   pulumi.String(example.ApplicationId),
			SemanticVersion: pulumi.String(example.SemanticVersion),
			Capabilities:    interface{}(example.RequiredCapabilities),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() => 
{
    var example = Aws.ServerlessRepository.GetApplication.Invoke(new()
    {
        ApplicationId = "arn:aws:serverlessrepo:us-east-1:123456789012:applications/ExampleApplication",
    });
    var exampleCloudFormationStack = new Aws.ServerlessRepository.CloudFormationStack("example", new()
    {
        Name = "Example",
        ApplicationId = example.Apply(getApplicationResult => getApplicationResult.ApplicationId),
        SemanticVersion = example.Apply(getApplicationResult => getApplicationResult.SemanticVersion),
        Capabilities = example.Apply(getApplicationResult => getApplicationResult.RequiredCapabilities),
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.serverlessrepository.ServerlessrepositoryFunctions;
import com.pulumi.aws.serverlessrepository.inputs.GetApplicationArgs;
import com.pulumi.aws.serverlessrepository.CloudFormationStack;
import com.pulumi.aws.serverlessrepository.CloudFormationStackArgs;
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 example = ServerlessrepositoryFunctions.getApplication(GetApplicationArgs.builder()
            .applicationId("arn:aws:serverlessrepo:us-east-1:123456789012:applications/ExampleApplication")
            .build());
        var exampleCloudFormationStack = new CloudFormationStack("exampleCloudFormationStack", CloudFormationStackArgs.builder()
            .name("Example")
            .applicationId(example.applyValue(getApplicationResult -> getApplicationResult.applicationId()))
            .semanticVersion(example.applyValue(getApplicationResult -> getApplicationResult.semanticVersion()))
            .capabilities(example.applyValue(getApplicationResult -> getApplicationResult.requiredCapabilities()))
            .build());
    }
}
resources:
  exampleCloudFormationStack:
    type: aws:serverlessrepository:CloudFormationStack
    name: example
    properties:
      name: Example
      applicationId: ${example.applicationId}
      semanticVersion: ${example.semanticVersion}
      capabilities: ${example.requiredCapabilities}
variables:
  example:
    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)
public static Output<GetApplicationResult> getApplication(GetApplicationArgs args, InvokeOptions options)
fn::invoke:
  function: aws:serverlessrepository/getApplication:getApplication
  arguments:
    # arguments dictionaryThe following arguments are supported:
- ApplicationId string
- ARN of the application.
- SemanticVersion string
- Requested version of the application. By default, retrieves the latest version.
- ApplicationId string
- ARN of the application.
- SemanticVersion string
- Requested version of the application. By default, retrieves the latest version.
- applicationId String
- ARN of the application.
- semanticVersion String
- Requested version of the application. By default, retrieves the latest version.
- applicationId string
- ARN of the application.
- semanticVersion string
- Requested version of the application. By default, retrieves the latest version.
- application_id str
- ARN of the application.
- semantic_version str
- Requested version of the application. By default, retrieves the latest version.
- applicationId String
- ARN of the application.
- semanticVersion String
- Requested version of the application. By default, retrieves the latest version.
getApplication Result
The following output properties are available:
- ApplicationId string
- ARN of the application.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Name of the application.
- RequiredCapabilities List<string>
- A list of capabilities describing the permissions needed to deploy the application.
- SemanticVersion string
- SourceCode stringUrl 
- URL pointing to the source code of the application version.
- TemplateUrl string
- URL pointing to the Cloud Formation template for the application version.
- ApplicationId string
- ARN of the application.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Name of the application.
- RequiredCapabilities []string
- A list of capabilities describing the permissions needed to deploy the application.
- SemanticVersion string
- SourceCode stringUrl 
- URL pointing to the source code of the application version.
- TemplateUrl string
- URL pointing to the Cloud Formation template for the application version.
- applicationId String
- ARN of the application.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- Name of the application.
- requiredCapabilities List<String>
- A list of capabilities describing the permissions needed to deploy the application.
- semanticVersion String
- sourceCode StringUrl 
- URL pointing to the source code of the application version.
- templateUrl String
- URL pointing to the Cloud Formation template for the application version.
- applicationId string
- ARN of the application.
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- Name of the application.
- requiredCapabilities string[]
- A list of capabilities describing the permissions needed to deploy the application.
- semanticVersion string
- sourceCode stringUrl 
- URL pointing to the source code of the application version.
- templateUrl string
- URL pointing to the Cloud Formation template for the application version.
- application_id str
- ARN of the application.
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- 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_ strurl 
- URL pointing to the source code of the application version.
- template_url str
- URL pointing to the Cloud Formation template for the application version.
- applicationId String
- ARN of the application.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- Name of the application.
- requiredCapabilities List<String>
- A list of capabilities describing the permissions needed to deploy the application.
- semanticVersion String
- sourceCode StringUrl 
- URL pointing to the source code of the application version.
- templateUrl String
- URL pointing to the Cloud Formation template for the application version.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the awsTerraform Provider.