aws.shield.Subscription
Explore with Pulumi AI
Resource for managing an AWS Shield Subscription.
This resource creates a subscription to AWS Shield Advanced, which requires a 1 year subscription commitment with a monthly fee. Refer to the AWS Shield Pricing page for more details.
Destruction of this resource will set
auto_renew
toDISABLED
. Automatic renewal can only be disabled during the last 30 days of a subscription. To unsubscribe outside of this window, you must contact AWS Support. Setskip_destroy
totrue
to skip modifying theauto_renew
argument during destruction.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.shield.Subscription("example", {autoRenew: "ENABLED"});
import pulumi
import pulumi_aws as aws
example = aws.shield.Subscription("example", auto_renew="ENABLED")
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/shield"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := shield.NewSubscription(ctx, "example", &shield.SubscriptionArgs{
AutoRenew: pulumi.String("ENABLED"),
})
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.Shield.Subscription("example", new()
{
AutoRenew = "ENABLED",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.shield.Subscription;
import com.pulumi.aws.shield.SubscriptionArgs;
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 Subscription("example", SubscriptionArgs.builder()
.autoRenew("ENABLED")
.build());
}
}
resources:
example:
type: aws:shield:Subscription
properties:
autoRenew: ENABLED
Create Subscription Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Subscription(name: string, args?: SubscriptionArgs, opts?: CustomResourceOptions);
@overload
def Subscription(resource_name: str,
args: Optional[SubscriptionArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def Subscription(resource_name: str,
opts: Optional[ResourceOptions] = None,
auto_renew: Optional[str] = None,
skip_destroy: Optional[bool] = None)
func NewSubscription(ctx *Context, name string, args *SubscriptionArgs, opts ...ResourceOption) (*Subscription, error)
public Subscription(string name, SubscriptionArgs? args = null, CustomResourceOptions? opts = null)
public Subscription(String name, SubscriptionArgs args)
public Subscription(String name, SubscriptionArgs args, CustomResourceOptions options)
type: aws:shield:Subscription
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 SubscriptionArgs
- 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 SubscriptionArgs
- 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 SubscriptionArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SubscriptionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SubscriptionArgs
- 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 subscriptionResource = new Aws.Shield.Subscription("subscriptionResource", new()
{
AutoRenew = "string",
SkipDestroy = false,
});
example, err := shield.NewSubscription(ctx, "subscriptionResource", &shield.SubscriptionArgs{
AutoRenew: pulumi.String("string"),
SkipDestroy: pulumi.Bool(false),
})
var subscriptionResource = new Subscription("subscriptionResource", SubscriptionArgs.builder()
.autoRenew("string")
.skipDestroy(false)
.build());
subscription_resource = aws.shield.Subscription("subscriptionResource",
auto_renew="string",
skip_destroy=False)
const subscriptionResource = new aws.shield.Subscription("subscriptionResource", {
autoRenew: "string",
skipDestroy: false,
});
type: aws:shield:Subscription
properties:
autoRenew: string
skipDestroy: false
Subscription Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Subscription resource accepts the following input properties:
- Auto
Renew string - Toggle for automated renewal of the subscription. Valid values are
ENABLED
orDISABLED
. Default isENABLED
. - Skip
Destroy bool - Skip attempting to disable automated renewal upon destruction. If set to
true
, theauto_renew
value will be left as-is and the resource will simply be removed from state.
- Auto
Renew string - Toggle for automated renewal of the subscription. Valid values are
ENABLED
orDISABLED
. Default isENABLED
. - Skip
Destroy bool - Skip attempting to disable automated renewal upon destruction. If set to
true
, theauto_renew
value will be left as-is and the resource will simply be removed from state.
- auto
Renew String - Toggle for automated renewal of the subscription. Valid values are
ENABLED
orDISABLED
. Default isENABLED
. - skip
Destroy Boolean - Skip attempting to disable automated renewal upon destruction. If set to
true
, theauto_renew
value will be left as-is and the resource will simply be removed from state.
- auto
Renew string - Toggle for automated renewal of the subscription. Valid values are
ENABLED
orDISABLED
. Default isENABLED
. - skip
Destroy boolean - Skip attempting to disable automated renewal upon destruction. If set to
true
, theauto_renew
value will be left as-is and the resource will simply be removed from state.
- auto_
renew str - Toggle for automated renewal of the subscription. Valid values are
ENABLED
orDISABLED
. Default isENABLED
. - skip_
destroy bool - Skip attempting to disable automated renewal upon destruction. If set to
true
, theauto_renew
value will be left as-is and the resource will simply be removed from state.
- auto
Renew String - Toggle for automated renewal of the subscription. Valid values are
ENABLED
orDISABLED
. Default isENABLED
. - skip
Destroy Boolean - Skip attempting to disable automated renewal upon destruction. If set to
true
, theauto_renew
value will be left as-is and the resource will simply be removed from state.
Outputs
All input properties are implicitly available as output properties. Additionally, the Subscription resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing Subscription Resource
Get an existing Subscription 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?: SubscriptionState, opts?: CustomResourceOptions): Subscription
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
auto_renew: Optional[str] = None,
skip_destroy: Optional[bool] = None) -> Subscription
func GetSubscription(ctx *Context, name string, id IDInput, state *SubscriptionState, opts ...ResourceOption) (*Subscription, error)
public static Subscription Get(string name, Input<string> id, SubscriptionState? state, CustomResourceOptions? opts = null)
public static Subscription get(String name, Output<String> id, SubscriptionState 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.
- Auto
Renew string - Toggle for automated renewal of the subscription. Valid values are
ENABLED
orDISABLED
. Default isENABLED
. - Skip
Destroy bool - Skip attempting to disable automated renewal upon destruction. If set to
true
, theauto_renew
value will be left as-is and the resource will simply be removed from state.
- Auto
Renew string - Toggle for automated renewal of the subscription. Valid values are
ENABLED
orDISABLED
. Default isENABLED
. - Skip
Destroy bool - Skip attempting to disable automated renewal upon destruction. If set to
true
, theauto_renew
value will be left as-is and the resource will simply be removed from state.
- auto
Renew String - Toggle for automated renewal of the subscription. Valid values are
ENABLED
orDISABLED
. Default isENABLED
. - skip
Destroy Boolean - Skip attempting to disable automated renewal upon destruction. If set to
true
, theauto_renew
value will be left as-is and the resource will simply be removed from state.
- auto
Renew string - Toggle for automated renewal of the subscription. Valid values are
ENABLED
orDISABLED
. Default isENABLED
. - skip
Destroy boolean - Skip attempting to disable automated renewal upon destruction. If set to
true
, theauto_renew
value will be left as-is and the resource will simply be removed from state.
- auto_
renew str - Toggle for automated renewal of the subscription. Valid values are
ENABLED
orDISABLED
. Default isENABLED
. - skip_
destroy bool - Skip attempting to disable automated renewal upon destruction. If set to
true
, theauto_renew
value will be left as-is and the resource will simply be removed from state.
- auto
Renew String - Toggle for automated renewal of the subscription. Valid values are
ENABLED
orDISABLED
. Default isENABLED
. - skip
Destroy Boolean - Skip attempting to disable automated renewal upon destruction. If set to
true
, theauto_renew
value will be left as-is and the resource will simply be removed from state.
Import
Using pulumi import
, import Shield Subscription using the id
. For example:
$ pulumi import aws:shield/subscription:Subscription example 123456789012
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.