aws.amplify.Webhook
Explore with Pulumi AI
Provides an Amplify Webhook resource.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.amplify.App("example", {name: "app"});
const master = new aws.amplify.Branch("master", {
appId: example.id,
branchName: "master",
});
const masterWebhook = new aws.amplify.Webhook("master", {
appId: example.id,
branchName: master.branchName,
description: "triggermaster",
});
import pulumi
import pulumi_aws as aws
example = aws.amplify.App("example", name="app")
master = aws.amplify.Branch("master",
app_id=example.id,
branch_name="master")
master_webhook = aws.amplify.Webhook("master",
app_id=example.id,
branch_name=master.branch_name,
description="triggermaster")
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/amplify"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := amplify.NewApp(ctx, "example", &lify.AppArgs{
Name: pulumi.String("app"),
})
if err != nil {
return err
}
master, err := amplify.NewBranch(ctx, "master", &lify.BranchArgs{
AppId: example.ID(),
BranchName: pulumi.String("master"),
})
if err != nil {
return err
}
_, err = amplify.NewWebhook(ctx, "master", &lify.WebhookArgs{
AppId: example.ID(),
BranchName: master.BranchName,
Description: pulumi.String("triggermaster"),
})
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 = new Aws.Amplify.App("example", new()
{
Name = "app",
});
var master = new Aws.Amplify.Branch("master", new()
{
AppId = example.Id,
BranchName = "master",
});
var masterWebhook = new Aws.Amplify.Webhook("master", new()
{
AppId = example.Id,
BranchName = master.BranchName,
Description = "triggermaster",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.amplify.App;
import com.pulumi.aws.amplify.AppArgs;
import com.pulumi.aws.amplify.Branch;
import com.pulumi.aws.amplify.BranchArgs;
import com.pulumi.aws.amplify.Webhook;
import com.pulumi.aws.amplify.WebhookArgs;
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) {
var example = new App("example", AppArgs.builder()
.name("app")
.build());
var master = new Branch("master", BranchArgs.builder()
.appId(example.id())
.branchName("master")
.build());
var masterWebhook = new Webhook("masterWebhook", WebhookArgs.builder()
.appId(example.id())
.branchName(master.branchName())
.description("triggermaster")
.build());
}
}
resources:
example:
type: aws:amplify:App
properties:
name: app
master:
type: aws:amplify:Branch
properties:
appId: ${example.id}
branchName: master
masterWebhook:
type: aws:amplify:Webhook
name: master
properties:
appId: ${example.id}
branchName: ${master.branchName}
description: triggermaster
Create Webhook Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Webhook(name: string, args: WebhookArgs, opts?: CustomResourceOptions);
@overload
def Webhook(resource_name: str,
args: WebhookArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Webhook(resource_name: str,
opts: Optional[ResourceOptions] = None,
app_id: Optional[str] = None,
branch_name: Optional[str] = None,
description: Optional[str] = None)
func NewWebhook(ctx *Context, name string, args WebhookArgs, opts ...ResourceOption) (*Webhook, error)
public Webhook(string name, WebhookArgs args, CustomResourceOptions? opts = null)
public Webhook(String name, WebhookArgs args)
public Webhook(String name, WebhookArgs args, CustomResourceOptions options)
type: aws:amplify:Webhook
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 WebhookArgs
- 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 WebhookArgs
- 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 WebhookArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args WebhookArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args WebhookArgs
- 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 webhookResource = new Aws.Amplify.Webhook("webhookResource", new()
{
AppId = "string",
BranchName = "string",
Description = "string",
});
example, err := amplify.NewWebhook(ctx, "webhookResource", &lify.WebhookArgs{
AppId: pulumi.String("string"),
BranchName: pulumi.String("string"),
Description: pulumi.String("string"),
})
var webhookResource = new Webhook("webhookResource", WebhookArgs.builder()
.appId("string")
.branchName("string")
.description("string")
.build());
webhook_resource = aws.amplify.Webhook("webhookResource",
app_id="string",
branch_name="string",
description="string")
const webhookResource = new aws.amplify.Webhook("webhookResource", {
appId: "string",
branchName: "string",
description: "string",
});
type: aws:amplify:Webhook
properties:
appId: string
branchName: string
description: string
Webhook Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The Webhook resource accepts the following input properties:
- App
Id string - Unique ID for an Amplify app.
- Branch
Name string - Name for a branch that is part of the Amplify app.
- Description string
- Description for a webhook.
- App
Id string - Unique ID for an Amplify app.
- Branch
Name string - Name for a branch that is part of the Amplify app.
- Description string
- Description for a webhook.
- app
Id String - Unique ID for an Amplify app.
- branch
Name String - Name for a branch that is part of the Amplify app.
- description String
- Description for a webhook.
- app
Id string - Unique ID for an Amplify app.
- branch
Name string - Name for a branch that is part of the Amplify app.
- description string
- Description for a webhook.
- app_
id str - Unique ID for an Amplify app.
- branch_
name str - Name for a branch that is part of the Amplify app.
- description str
- Description for a webhook.
- app
Id String - Unique ID for an Amplify app.
- branch
Name String - Name for a branch that is part of the Amplify app.
- description String
- Description for a webhook.
Outputs
All input properties are implicitly available as output properties. Additionally, the Webhook resource produces the following output properties:
Look up Existing Webhook Resource
Get an existing Webhook 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?: WebhookState, opts?: CustomResourceOptions): Webhook
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
app_id: Optional[str] = None,
arn: Optional[str] = None,
branch_name: Optional[str] = None,
description: Optional[str] = None,
url: Optional[str] = None) -> Webhook
func GetWebhook(ctx *Context, name string, id IDInput, state *WebhookState, opts ...ResourceOption) (*Webhook, error)
public static Webhook Get(string name, Input<string> id, WebhookState? state, CustomResourceOptions? opts = null)
public static Webhook get(String name, Output<String> id, WebhookState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- App
Id string - Unique ID for an Amplify app.
- Arn string
- ARN for the webhook.
- Branch
Name string - Name for a branch that is part of the Amplify app.
- Description string
- Description for a webhook.
- Url string
- URL of the webhook.
- App
Id string - Unique ID for an Amplify app.
- Arn string
- ARN for the webhook.
- Branch
Name string - Name for a branch that is part of the Amplify app.
- Description string
- Description for a webhook.
- Url string
- URL of the webhook.
- app
Id String - Unique ID for an Amplify app.
- arn String
- ARN for the webhook.
- branch
Name String - Name for a branch that is part of the Amplify app.
- description String
- Description for a webhook.
- url String
- URL of the webhook.
- app
Id string - Unique ID for an Amplify app.
- arn string
- ARN for the webhook.
- branch
Name string - Name for a branch that is part of the Amplify app.
- description string
- Description for a webhook.
- url string
- URL of the webhook.
- app_
id str - Unique ID for an Amplify app.
- arn str
- ARN for the webhook.
- branch_
name str - Name for a branch that is part of the Amplify app.
- description str
- Description for a webhook.
- url str
- URL of the webhook.
- app
Id String - Unique ID for an Amplify app.
- arn String
- ARN for the webhook.
- branch
Name String - Name for a branch that is part of the Amplify app.
- description String
- Description for a webhook.
- url String
- URL of the webhook.
Import
Using pulumi import
, import Amplify webhook using a webhook ID. For example:
$ pulumi import aws:amplify/webhook:Webhook master a26b22a0-748b-4b57-b9a0-ae7e601fe4b1
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.