We recommend using Azure Native.
azure.chaosstudio.Capability
Explore with Pulumi AI
Manages a Chaos Studio Capability.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const exampleResourceGroup = new azure.core.ResourceGroup("example", {
name: "example-resources",
location: "West Europe",
});
const example = new azure.containerservice.KubernetesCluster("example", {
name: "example",
location: exampleResourceGroup.location,
resourceGroupName: exampleResourceGroup.name,
dnsPrefix: "acctestaksexample",
defaultNodePool: {
name: "example-value",
nodeCount: "example-value",
vmSize: "example-value",
},
identity: {
type: "example-value",
},
});
const exampleTarget = new azure.chaosstudio.Target("example", {
location: exampleResourceGroup.location,
targetResourceId: example.id,
targetType: "example-value",
});
const exampleCapability = new azure.chaosstudio.Capability("example", {
capabilityType: "example-value",
chaosStudioTargetId: exampleTarget.id,
});
import pulumi
import pulumi_azure as azure
example_resource_group = azure.core.ResourceGroup("example",
name="example-resources",
location="West Europe")
example = azure.containerservice.KubernetesCluster("example",
name="example",
location=example_resource_group.location,
resource_group_name=example_resource_group.name,
dns_prefix="acctestaksexample",
default_node_pool=azure.containerservice.KubernetesClusterDefaultNodePoolArgs(
name="example-value",
node_count="example-value",
vm_size="example-value",
),
identity=azure.containerservice.KubernetesClusterIdentityArgs(
type="example-value",
))
example_target = azure.chaosstudio.Target("example",
location=example_resource_group.location,
target_resource_id=example.id,
target_type="example-value")
example_capability = azure.chaosstudio.Capability("example",
capability_type="example-value",
chaos_studio_target_id=example_target.id)
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/chaosstudio"
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/containerservice"
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleResourceGroup, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
Name: pulumi.String("example-resources"),
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
example, err := containerservice.NewKubernetesCluster(ctx, "example", &containerservice.KubernetesClusterArgs{
Name: pulumi.String("example"),
Location: exampleResourceGroup.Location,
ResourceGroupName: exampleResourceGroup.Name,
DnsPrefix: pulumi.String("acctestaksexample"),
DefaultNodePool: &containerservice.KubernetesClusterDefaultNodePoolArgs{
Name: pulumi.String("example-value"),
NodeCount: pulumi.Int("example-value"),
VmSize: pulumi.String("example-value"),
},
Identity: &containerservice.KubernetesClusterIdentityArgs{
Type: pulumi.String("example-value"),
},
})
if err != nil {
return err
}
exampleTarget, err := chaosstudio.NewTarget(ctx, "example", &chaosstudio.TargetArgs{
Location: exampleResourceGroup.Location,
TargetResourceId: example.ID(),
TargetType: pulumi.String("example-value"),
})
if err != nil {
return err
}
_, err = chaosstudio.NewCapability(ctx, "example", &chaosstudio.CapabilityArgs{
CapabilityType: pulumi.String("example-value"),
ChaosStudioTargetId: exampleTarget.ID(),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var exampleResourceGroup = new Azure.Core.ResourceGroup("example", new()
{
Name = "example-resources",
Location = "West Europe",
});
var example = new Azure.ContainerService.KubernetesCluster("example", new()
{
Name = "example",
Location = exampleResourceGroup.Location,
ResourceGroupName = exampleResourceGroup.Name,
DnsPrefix = "acctestaksexample",
DefaultNodePool = new Azure.ContainerService.Inputs.KubernetesClusterDefaultNodePoolArgs
{
Name = "example-value",
NodeCount = "example-value",
VmSize = "example-value",
},
Identity = new Azure.ContainerService.Inputs.KubernetesClusterIdentityArgs
{
Type = "example-value",
},
});
var exampleTarget = new Azure.ChaosStudio.Target("example", new()
{
Location = exampleResourceGroup.Location,
TargetResourceId = example.Id,
TargetType = "example-value",
});
var exampleCapability = new Azure.ChaosStudio.Capability("example", new()
{
CapabilityType = "example-value",
ChaosStudioTargetId = exampleTarget.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.containerservice.KubernetesCluster;
import com.pulumi.azure.containerservice.KubernetesClusterArgs;
import com.pulumi.azure.containerservice.inputs.KubernetesClusterDefaultNodePoolArgs;
import com.pulumi.azure.containerservice.inputs.KubernetesClusterIdentityArgs;
import com.pulumi.azure.chaosstudio.Target;
import com.pulumi.azure.chaosstudio.TargetArgs;
import com.pulumi.azure.chaosstudio.Capability;
import com.pulumi.azure.chaosstudio.CapabilityArgs;
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 exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
.name("example-resources")
.location("West Europe")
.build());
var example = new KubernetesCluster("example", KubernetesClusterArgs.builder()
.name("example")
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.dnsPrefix("acctestaksexample")
.defaultNodePool(KubernetesClusterDefaultNodePoolArgs.builder()
.name("example-value")
.nodeCount("example-value")
.vmSize("example-value")
.build())
.identity(KubernetesClusterIdentityArgs.builder()
.type("example-value")
.build())
.build());
var exampleTarget = new Target("exampleTarget", TargetArgs.builder()
.location(exampleResourceGroup.location())
.targetResourceId(example.id())
.targetType("example-value")
.build());
var exampleCapability = new Capability("exampleCapability", CapabilityArgs.builder()
.capabilityType("example-value")
.chaosStudioTargetId(exampleTarget.id())
.build());
}
}
resources:
example:
type: azure:containerservice:KubernetesCluster
properties:
name: example
location: ${exampleResourceGroup.location}
resourceGroupName: ${exampleResourceGroup.name}
dnsPrefix: acctestaksexample
defaultNodePool:
name: example-value
nodeCount: example-value
vmSize: example-value
identity:
type: example-value
exampleResourceGroup:
type: azure:core:ResourceGroup
name: example
properties:
name: example-resources
location: West Europe
exampleTarget:
type: azure:chaosstudio:Target
name: example
properties:
location: ${exampleResourceGroup.location}
targetResourceId: ${example.id}
targetType: example-value
exampleCapability:
type: azure:chaosstudio:Capability
name: example
properties:
capabilityType: example-value
chaosStudioTargetId: ${exampleTarget.id}
Create Capability Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Capability(name: string, args: CapabilityArgs, opts?: CustomResourceOptions);
@overload
def Capability(resource_name: str,
args: CapabilityArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Capability(resource_name: str,
opts: Optional[ResourceOptions] = None,
capability_type: Optional[str] = None,
chaos_studio_target_id: Optional[str] = None)
func NewCapability(ctx *Context, name string, args CapabilityArgs, opts ...ResourceOption) (*Capability, error)
public Capability(string name, CapabilityArgs args, CustomResourceOptions? opts = null)
public Capability(String name, CapabilityArgs args)
public Capability(String name, CapabilityArgs args, CustomResourceOptions options)
type: azure:chaosstudio:Capability
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 CapabilityArgs
- 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 CapabilityArgs
- 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 CapabilityArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CapabilityArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CapabilityArgs
- 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 capabilityResource = new Azure.ChaosStudio.Capability("capabilityResource", new()
{
CapabilityType = "string",
ChaosStudioTargetId = "string",
});
example, err := chaosstudio.NewCapability(ctx, "capabilityResource", &chaosstudio.CapabilityArgs{
CapabilityType: pulumi.String("string"),
ChaosStudioTargetId: pulumi.String("string"),
})
var capabilityResource = new Capability("capabilityResource", CapabilityArgs.builder()
.capabilityType("string")
.chaosStudioTargetId("string")
.build());
capability_resource = azure.chaosstudio.Capability("capabilityResource",
capability_type="string",
chaos_studio_target_id="string")
const capabilityResource = new azure.chaosstudio.Capability("capabilityResource", {
capabilityType: "string",
chaosStudioTargetId: "string",
});
type: azure:chaosstudio:Capability
properties:
capabilityType: string
chaosStudioTargetId: string
Capability 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 Capability resource accepts the following input properties:
- Capability
Type string - The capability that should be applied to the Chaos Studio Target. For supported values please see this Chaos Studio Fault Library. Changing this forces a new Chaos Studio Capability to be created.
- Chaos
Studio stringTarget Id - The Chaos Studio Target that the capability should be applied to. Changing this forces a new Chaos Studio Capability to be created.
- Capability
Type string - The capability that should be applied to the Chaos Studio Target. For supported values please see this Chaos Studio Fault Library. Changing this forces a new Chaos Studio Capability to be created.
- Chaos
Studio stringTarget Id - The Chaos Studio Target that the capability should be applied to. Changing this forces a new Chaos Studio Capability to be created.
- capability
Type String - The capability that should be applied to the Chaos Studio Target. For supported values please see this Chaos Studio Fault Library. Changing this forces a new Chaos Studio Capability to be created.
- chaos
Studio StringTarget Id - The Chaos Studio Target that the capability should be applied to. Changing this forces a new Chaos Studio Capability to be created.
- capability
Type string - The capability that should be applied to the Chaos Studio Target. For supported values please see this Chaos Studio Fault Library. Changing this forces a new Chaos Studio Capability to be created.
- chaos
Studio stringTarget Id - The Chaos Studio Target that the capability should be applied to. Changing this forces a new Chaos Studio Capability to be created.
- capability_
type str - The capability that should be applied to the Chaos Studio Target. For supported values please see this Chaos Studio Fault Library. Changing this forces a new Chaos Studio Capability to be created.
- chaos_
studio_ strtarget_ id - The Chaos Studio Target that the capability should be applied to. Changing this forces a new Chaos Studio Capability to be created.
- capability
Type String - The capability that should be applied to the Chaos Studio Target. For supported values please see this Chaos Studio Fault Library. Changing this forces a new Chaos Studio Capability to be created.
- chaos
Studio StringTarget Id - The Chaos Studio Target that the capability should be applied to. Changing this forces a new Chaos Studio Capability to be created.
Outputs
All input properties are implicitly available as output properties. Additionally, the Capability resource produces the following output properties:
- Capability
Urn string - The Unique Resource Name of the Capability.
- Id string
- The provider-assigned unique ID for this managed resource.
- Capability
Urn string - The Unique Resource Name of the Capability.
- Id string
- The provider-assigned unique ID for this managed resource.
- capability
Urn String - The Unique Resource Name of the Capability.
- id String
- The provider-assigned unique ID for this managed resource.
- capability
Urn string - The Unique Resource Name of the Capability.
- id string
- The provider-assigned unique ID for this managed resource.
- capability_
urn str - The Unique Resource Name of the Capability.
- id str
- The provider-assigned unique ID for this managed resource.
- capability
Urn String - The Unique Resource Name of the Capability.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing Capability Resource
Get an existing Capability 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?: CapabilityState, opts?: CustomResourceOptions): Capability
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
capability_type: Optional[str] = None,
capability_urn: Optional[str] = None,
chaos_studio_target_id: Optional[str] = None) -> Capability
func GetCapability(ctx *Context, name string, id IDInput, state *CapabilityState, opts ...ResourceOption) (*Capability, error)
public static Capability Get(string name, Input<string> id, CapabilityState? state, CustomResourceOptions? opts = null)
public static Capability get(String name, Output<String> id, CapabilityState 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.
- Capability
Type string - The capability that should be applied to the Chaos Studio Target. For supported values please see this Chaos Studio Fault Library. Changing this forces a new Chaos Studio Capability to be created.
- Capability
Urn string - The Unique Resource Name of the Capability.
- Chaos
Studio stringTarget Id - The Chaos Studio Target that the capability should be applied to. Changing this forces a new Chaos Studio Capability to be created.
- Capability
Type string - The capability that should be applied to the Chaos Studio Target. For supported values please see this Chaos Studio Fault Library. Changing this forces a new Chaos Studio Capability to be created.
- Capability
Urn string - The Unique Resource Name of the Capability.
- Chaos
Studio stringTarget Id - The Chaos Studio Target that the capability should be applied to. Changing this forces a new Chaos Studio Capability to be created.
- capability
Type String - The capability that should be applied to the Chaos Studio Target. For supported values please see this Chaos Studio Fault Library. Changing this forces a new Chaos Studio Capability to be created.
- capability
Urn String - The Unique Resource Name of the Capability.
- chaos
Studio StringTarget Id - The Chaos Studio Target that the capability should be applied to. Changing this forces a new Chaos Studio Capability to be created.
- capability
Type string - The capability that should be applied to the Chaos Studio Target. For supported values please see this Chaos Studio Fault Library. Changing this forces a new Chaos Studio Capability to be created.
- capability
Urn string - The Unique Resource Name of the Capability.
- chaos
Studio stringTarget Id - The Chaos Studio Target that the capability should be applied to. Changing this forces a new Chaos Studio Capability to be created.
- capability_
type str - The capability that should be applied to the Chaos Studio Target. For supported values please see this Chaos Studio Fault Library. Changing this forces a new Chaos Studio Capability to be created.
- capability_
urn str - The Unique Resource Name of the Capability.
- chaos_
studio_ strtarget_ id - The Chaos Studio Target that the capability should be applied to. Changing this forces a new Chaos Studio Capability to be created.
- capability
Type String - The capability that should be applied to the Chaos Studio Target. For supported values please see this Chaos Studio Fault Library. Changing this forces a new Chaos Studio Capability to be created.
- capability
Urn String - The Unique Resource Name of the Capability.
- chaos
Studio StringTarget Id - The Chaos Studio Target that the capability should be applied to. Changing this forces a new Chaos Studio Capability to be created.
Import
An existing Chaos Studio Target can be imported into Terraform using the resource id
, e.g.
$ pulumi import azure:chaosstudio/capability:Capability example /{scope}/providers/Microsoft.Chaos/targets/{targetName}/capabilities/{capabilityName}
Where
{scope}
is the ID of the Azure Resource under which the Chaos Studio Target exists. For example/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group
.Where
{targetName}
is the name of the Target. For exampletargetValue
.Where
{capabilityName}
is the name of the Capability. For examplecapabilityName
.
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurerm
Terraform Provider.