Try AWS Native preview for resources not in the classic version.
aws.synthetics.GroupAssociation
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
Provides a Synthetics Group Association resource.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.synthetics.GroupAssociation("example", {
groupName: exampleAwsSyntheticsGroup.name,
canaryArn: exampleAwsSyntheticsCanary.arn,
});
import pulumi
import pulumi_aws as aws
example = aws.synthetics.GroupAssociation("example",
group_name=example_aws_synthetics_group["name"],
canary_arn=example_aws_synthetics_canary["arn"])
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/synthetics"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := synthetics.NewGroupAssociation(ctx, "example", &synthetics.GroupAssociationArgs{
GroupName: pulumi.Any(exampleAwsSyntheticsGroup.Name),
CanaryArn: pulumi.Any(exampleAwsSyntheticsCanary.Arn),
})
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.Synthetics.GroupAssociation("example", new()
{
GroupName = exampleAwsSyntheticsGroup.Name,
CanaryArn = exampleAwsSyntheticsCanary.Arn,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.synthetics.GroupAssociation;
import com.pulumi.aws.synthetics.GroupAssociationArgs;
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 GroupAssociation("example", GroupAssociationArgs.builder()
.groupName(exampleAwsSyntheticsGroup.name())
.canaryArn(exampleAwsSyntheticsCanary.arn())
.build());
}
}
resources:
example:
type: aws:synthetics:GroupAssociation
properties:
groupName: ${exampleAwsSyntheticsGroup.name}
canaryArn: ${exampleAwsSyntheticsCanary.arn}
Create GroupAssociation Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new GroupAssociation(name: string, args: GroupAssociationArgs, opts?: CustomResourceOptions);
@overload
def GroupAssociation(resource_name: str,
args: GroupAssociationArgs,
opts: Optional[ResourceOptions] = None)
@overload
def GroupAssociation(resource_name: str,
opts: Optional[ResourceOptions] = None,
canary_arn: Optional[str] = None,
group_name: Optional[str] = None)
func NewGroupAssociation(ctx *Context, name string, args GroupAssociationArgs, opts ...ResourceOption) (*GroupAssociation, error)
public GroupAssociation(string name, GroupAssociationArgs args, CustomResourceOptions? opts = null)
public GroupAssociation(String name, GroupAssociationArgs args)
public GroupAssociation(String name, GroupAssociationArgs args, CustomResourceOptions options)
type: aws:synthetics:GroupAssociation
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 GroupAssociationArgs
- 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 GroupAssociationArgs
- 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 GroupAssociationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args GroupAssociationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args GroupAssociationArgs
- 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 groupAssociationResource = new Aws.Synthetics.GroupAssociation("groupAssociationResource", new()
{
CanaryArn = "string",
GroupName = "string",
});
example, err := synthetics.NewGroupAssociation(ctx, "groupAssociationResource", &synthetics.GroupAssociationArgs{
CanaryArn: pulumi.String("string"),
GroupName: pulumi.String("string"),
})
var groupAssociationResource = new GroupAssociation("groupAssociationResource", GroupAssociationArgs.builder()
.canaryArn("string")
.groupName("string")
.build());
group_association_resource = aws.synthetics.GroupAssociation("groupAssociationResource",
canary_arn="string",
group_name="string")
const groupAssociationResource = new aws.synthetics.GroupAssociation("groupAssociationResource", {
canaryArn: "string",
groupName: "string",
});
type: aws:synthetics:GroupAssociation
properties:
canaryArn: string
groupName: string
GroupAssociation 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 GroupAssociation resource accepts the following input properties:
- canary_
arn str - ARN of the canary.
- group_
name str - Name of the group that the canary will be associated with.
Outputs
All input properties are implicitly available as output properties. Additionally, the GroupAssociation resource produces the following output properties:
Look up Existing GroupAssociation Resource
Get an existing GroupAssociation 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?: GroupAssociationState, opts?: CustomResourceOptions): GroupAssociation
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
canary_arn: Optional[str] = None,
group_arn: Optional[str] = None,
group_id: Optional[str] = None,
group_name: Optional[str] = None) -> GroupAssociation
func GetGroupAssociation(ctx *Context, name string, id IDInput, state *GroupAssociationState, opts ...ResourceOption) (*GroupAssociation, error)
public static GroupAssociation Get(string name, Input<string> id, GroupAssociationState? state, CustomResourceOptions? opts = null)
public static GroupAssociation get(String name, Output<String> id, GroupAssociationState 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.
- canary_
arn str - ARN of the canary.
- group_
arn str - group_
id str - ID of the Group.
- group_
name str - Name of the group that the canary will be associated with.
Import
Using pulumi import
, import CloudWatch Synthetics Group Association using the canary_arn,group_name
. For example:
$ pulumi import aws:synthetics/groupAssociation:GroupAssociation example arn:aws:synthetics:us-west-2:123456789012:canary:tf-acc-test-abcd1234,examplename
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.
Try AWS Native preview for resources not in the classic version.