Try AWS Native preview for resources not in the classic version.
aws.serverlessrepository.getApplication
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
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)
// Output-based functions aren't available in Java yet
fn::invoke:
function: aws:serverlessrepository/getApplication:getApplication
arguments:
# arguments dictionary
The following arguments are supported:
- Application
Id string - ARN of the application.
- Semantic
Version string - Requested version of the application. By default, retrieves the latest version.
- Application
Id string - ARN of the application.
- Semantic
Version string - Requested version of the application. By default, retrieves the latest version.
- application
Id String - ARN of the application.
- semantic
Version String - Requested version of the application. By default, retrieves the latest version.
- application
Id string - ARN of the application.
- semantic
Version 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.
- application
Id String - ARN of the application.
- semantic
Version String - Requested version of the application. By default, retrieves the latest version.
getApplication Result
The following output properties are available:
- Application
Id string - ARN of the application.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Name of the application.
- Required
Capabilities List<string> - A list of capabilities describing the permissions needed to deploy the application.
- Semantic
Version string - Source
Code stringUrl - URL pointing to the source code of the application version.
- Template
Url string - URL pointing to the Cloud Formation template for the application version.
- Application
Id string - ARN of the application.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Name of the application.
- Required
Capabilities []string - A list of capabilities describing the permissions needed to deploy the application.
- Semantic
Version string - Source
Code stringUrl - URL pointing to the source code of the application version.
- Template
Url string - URL pointing to the Cloud Formation template for the application version.
- application
Id String - ARN of the application.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- Name of the application.
- required
Capabilities List<String> - A list of capabilities describing the permissions needed to deploy the application.
- semantic
Version String - source
Code StringUrl - URL pointing to the source code of the application version.
- template
Url String - URL pointing to the Cloud Formation template for the application version.
- application
Id string - ARN of the application.
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- Name of the application.
- required
Capabilities string[] - A list of capabilities describing the permissions needed to deploy the application.
- semantic
Version string - source
Code stringUrl - URL pointing to the source code of the application version.
- template
Url 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.
- application
Id String - ARN of the application.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- Name of the application.
- required
Capabilities List<String> - A list of capabilities describing the permissions needed to deploy the application.
- semantic
Version String - source
Code StringUrl - URL pointing to the source code of the application version.
- template
Url 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
aws
Terraform Provider.
Try AWS Native preview for resources not in the classic version.