1. Packages
  2. Cisco IOS XE Resource Provider
  3. API Docs
  4. CryptoIkev2Policy
Cisco IOS XE v0.0.1 published on Friday, Sep 22, 2023 by lbrlabs

iosxe.CryptoIkev2Policy

Explore with Pulumi AI

iosxe logo
Cisco IOS XE v0.0.1 published on Friday, Sep 22, 2023 by lbrlabs

    This resource can manage the Crypto IKEv2 Policy configuration.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Iosxe = Lbrlabs.PulumiPackage.Iosxe;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Iosxe.CryptoIkev2Policy("example", new()
        {
            MatchAddressLocalIps = new[]
            {
                "1.2.3.4",
            },
            MatchFvrfAny = true,
            Proposals = new[]
            {
                new Iosxe.Inputs.CryptoIkev2PolicyProposalArgs
                {
                    Proposals = "proposal123",
                },
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/lbrlabs/pulumi-iosxe/sdk/go/iosxe"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := iosxe.NewCryptoIkev2Policy(ctx, "example", &iosxe.CryptoIkev2PolicyArgs{
    			MatchAddressLocalIps: pulumi.StringArray{
    				pulumi.String("1.2.3.4"),
    			},
    			MatchFvrfAny: pulumi.Bool(true),
    			Proposals: iosxe.CryptoIkev2PolicyProposalArray{
    				&iosxe.CryptoIkev2PolicyProposalArgs{
    					Proposals: pulumi.String("proposal123"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.iosxe.CryptoIkev2Policy;
    import com.pulumi.iosxe.CryptoIkev2PolicyArgs;
    import com.pulumi.iosxe.inputs.CryptoIkev2PolicyProposalArgs;
    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 CryptoIkev2Policy("example", CryptoIkev2PolicyArgs.builder()        
                .matchAddressLocalIps("1.2.3.4")
                .matchFvrfAny(true)
                .proposals(CryptoIkev2PolicyProposalArgs.builder()
                    .proposals("proposal123")
                    .build())
                .build());
    
        }
    }
    
    import pulumi
    import lbrlabs_pulumi_iosxe as iosxe
    
    example = iosxe.CryptoIkev2Policy("example",
        match_address_local_ips=["1.2.3.4"],
        match_fvrf_any=True,
        proposals=[iosxe.CryptoIkev2PolicyProposalArgs(
            proposals="proposal123",
        )])
    
    import * as pulumi from "@pulumi/pulumi";
    import * as iosxe from "@lbrlabs/pulumi-iosxe";
    
    const example = new iosxe.CryptoIkev2Policy("example", {
        matchAddressLocalIps: ["1.2.3.4"],
        matchFvrfAny: true,
        proposals: [{
            proposals: "proposal123",
        }],
    });
    
    resources:
      example:
        type: iosxe:CryptoIkev2Policy
        properties:
          matchAddressLocalIps:
            - 1.2.3.4
          matchFvrfAny: true
          proposals:
            - proposals: proposal123
    

    Create CryptoIkev2Policy Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new CryptoIkev2Policy(name: string, args: CryptoIkev2PolicyArgs, opts?: CustomResourceOptions);
    @overload
    def CryptoIkev2Policy(resource_name: str,
                          args: CryptoIkev2PolicyArgs,
                          opts: Optional[ResourceOptions] = None)
    
    @overload
    def CryptoIkev2Policy(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          proposals: Optional[Sequence[CryptoIkev2PolicyProposalArgs]] = None,
                          device: Optional[str] = None,
                          match_address_local_ips: Optional[Sequence[str]] = None,
                          match_fvrf: Optional[str] = None,
                          match_fvrf_any: Optional[bool] = None,
                          match_inbound_only: Optional[bool] = None,
                          name: Optional[str] = None)
    func NewCryptoIkev2Policy(ctx *Context, name string, args CryptoIkev2PolicyArgs, opts ...ResourceOption) (*CryptoIkev2Policy, error)
    public CryptoIkev2Policy(string name, CryptoIkev2PolicyArgs args, CustomResourceOptions? opts = null)
    public CryptoIkev2Policy(String name, CryptoIkev2PolicyArgs args)
    public CryptoIkev2Policy(String name, CryptoIkev2PolicyArgs args, CustomResourceOptions options)
    
    type: iosxe:CryptoIkev2Policy
    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 CryptoIkev2PolicyArgs
    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 CryptoIkev2PolicyArgs
    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 CryptoIkev2PolicyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CryptoIkev2PolicyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CryptoIkev2PolicyArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var cryptoIkev2PolicyResource = new Iosxe.CryptoIkev2Policy("cryptoIkev2PolicyResource", new()
    {
        Proposals = new[]
        {
            new Iosxe.Inputs.CryptoIkev2PolicyProposalArgs
            {
                Proposals = "string",
            },
        },
        Device = "string",
        MatchAddressLocalIps = new[]
        {
            "string",
        },
        MatchFvrf = "string",
        MatchFvrfAny = false,
        MatchInboundOnly = false,
        Name = "string",
    });
    
    example, err := iosxe.NewCryptoIkev2Policy(ctx, "cryptoIkev2PolicyResource", &iosxe.CryptoIkev2PolicyArgs{
    	Proposals: iosxe.CryptoIkev2PolicyProposalArray{
    		&iosxe.CryptoIkev2PolicyProposalArgs{
    			Proposals: pulumi.String("string"),
    		},
    	},
    	Device: pulumi.String("string"),
    	MatchAddressLocalIps: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	MatchFvrf:        pulumi.String("string"),
    	MatchFvrfAny:     pulumi.Bool(false),
    	MatchInboundOnly: pulumi.Bool(false),
    	Name:             pulumi.String("string"),
    })
    
    var cryptoIkev2PolicyResource = new CryptoIkev2Policy("cryptoIkev2PolicyResource", CryptoIkev2PolicyArgs.builder()        
        .proposals(CryptoIkev2PolicyProposalArgs.builder()
            .proposals("string")
            .build())
        .device("string")
        .matchAddressLocalIps("string")
        .matchFvrf("string")
        .matchFvrfAny(false)
        .matchInboundOnly(false)
        .name("string")
        .build());
    
    crypto_ikev2_policy_resource = iosxe.CryptoIkev2Policy("cryptoIkev2PolicyResource",
        proposals=[iosxe.CryptoIkev2PolicyProposalArgs(
            proposals="string",
        )],
        device="string",
        match_address_local_ips=["string"],
        match_fvrf="string",
        match_fvrf_any=False,
        match_inbound_only=False,
        name="string")
    
    const cryptoIkev2PolicyResource = new iosxe.CryptoIkev2Policy("cryptoIkev2PolicyResource", {
        proposals: [{
            proposals: "string",
        }],
        device: "string",
        matchAddressLocalIps: ["string"],
        matchFvrf: "string",
        matchFvrfAny: false,
        matchInboundOnly: false,
        name: "string",
    });
    
    type: iosxe:CryptoIkev2Policy
    properties:
        device: string
        matchAddressLocalIps:
            - string
        matchFvrf: string
        matchFvrfAny: false
        matchInboundOnly: false
        name: string
        proposals:
            - proposals: string
    

    CryptoIkev2Policy 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 CryptoIkev2Policy resource accepts the following input properties:

    Proposals List<Lbrlabs.PulumiPackage.Iosxe.Inputs.CryptoIkev2PolicyProposal>
    Specify Proposal
    Device string
    A device name from the provider configuration.
    MatchAddressLocalIps List<string>
    Local address
    MatchFvrf string
    MatchFvrfAny bool
    Any fvrf
    MatchInboundOnly bool
    inbound only for controller
    Name string
    Proposals []CryptoIkev2PolicyProposalArgs
    Specify Proposal
    Device string
    A device name from the provider configuration.
    MatchAddressLocalIps []string
    Local address
    MatchFvrf string
    MatchFvrfAny bool
    Any fvrf
    MatchInboundOnly bool
    inbound only for controller
    Name string
    proposals List<CryptoIkev2PolicyProposal>
    Specify Proposal
    device String
    A device name from the provider configuration.
    matchAddressLocalIps List<String>
    Local address
    matchFvrf String
    matchFvrfAny Boolean
    Any fvrf
    matchInboundOnly Boolean
    inbound only for controller
    name String
    proposals CryptoIkev2PolicyProposal[]
    Specify Proposal
    device string
    A device name from the provider configuration.
    matchAddressLocalIps string[]
    Local address
    matchFvrf string
    matchFvrfAny boolean
    Any fvrf
    matchInboundOnly boolean
    inbound only for controller
    name string
    proposals Sequence[CryptoIkev2PolicyProposalArgs]
    Specify Proposal
    device str
    A device name from the provider configuration.
    match_address_local_ips Sequence[str]
    Local address
    match_fvrf str
    match_fvrf_any bool
    Any fvrf
    match_inbound_only bool
    inbound only for controller
    name str
    proposals List<Property Map>
    Specify Proposal
    device String
    A device name from the provider configuration.
    matchAddressLocalIps List<String>
    Local address
    matchFvrf String
    matchFvrfAny Boolean
    Any fvrf
    matchInboundOnly Boolean
    inbound only for controller
    name String

    Outputs

    All input properties are implicitly available as output properties. Additionally, the CryptoIkev2Policy 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 CryptoIkev2Policy Resource

    Get an existing CryptoIkev2Policy 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?: CryptoIkev2PolicyState, opts?: CustomResourceOptions): CryptoIkev2Policy
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            device: Optional[str] = None,
            match_address_local_ips: Optional[Sequence[str]] = None,
            match_fvrf: Optional[str] = None,
            match_fvrf_any: Optional[bool] = None,
            match_inbound_only: Optional[bool] = None,
            name: Optional[str] = None,
            proposals: Optional[Sequence[CryptoIkev2PolicyProposalArgs]] = None) -> CryptoIkev2Policy
    func GetCryptoIkev2Policy(ctx *Context, name string, id IDInput, state *CryptoIkev2PolicyState, opts ...ResourceOption) (*CryptoIkev2Policy, error)
    public static CryptoIkev2Policy Get(string name, Input<string> id, CryptoIkev2PolicyState? state, CustomResourceOptions? opts = null)
    public static CryptoIkev2Policy get(String name, Output<String> id, CryptoIkev2PolicyState 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.
    The following state arguments are supported:
    Device string
    A device name from the provider configuration.
    MatchAddressLocalIps List<string>
    Local address
    MatchFvrf string
    MatchFvrfAny bool
    Any fvrf
    MatchInboundOnly bool
    inbound only for controller
    Name string
    Proposals List<Lbrlabs.PulumiPackage.Iosxe.Inputs.CryptoIkev2PolicyProposal>
    Specify Proposal
    Device string
    A device name from the provider configuration.
    MatchAddressLocalIps []string
    Local address
    MatchFvrf string
    MatchFvrfAny bool
    Any fvrf
    MatchInboundOnly bool
    inbound only for controller
    Name string
    Proposals []CryptoIkev2PolicyProposalArgs
    Specify Proposal
    device String
    A device name from the provider configuration.
    matchAddressLocalIps List<String>
    Local address
    matchFvrf String
    matchFvrfAny Boolean
    Any fvrf
    matchInboundOnly Boolean
    inbound only for controller
    name String
    proposals List<CryptoIkev2PolicyProposal>
    Specify Proposal
    device string
    A device name from the provider configuration.
    matchAddressLocalIps string[]
    Local address
    matchFvrf string
    matchFvrfAny boolean
    Any fvrf
    matchInboundOnly boolean
    inbound only for controller
    name string
    proposals CryptoIkev2PolicyProposal[]
    Specify Proposal
    device str
    A device name from the provider configuration.
    match_address_local_ips Sequence[str]
    Local address
    match_fvrf str
    match_fvrf_any bool
    Any fvrf
    match_inbound_only bool
    inbound only for controller
    name str
    proposals Sequence[CryptoIkev2PolicyProposalArgs]
    Specify Proposal
    device String
    A device name from the provider configuration.
    matchAddressLocalIps List<String>
    Local address
    matchFvrf String
    matchFvrfAny Boolean
    Any fvrf
    matchInboundOnly Boolean
    inbound only for controller
    name String
    proposals List<Property Map>
    Specify Proposal

    Supporting Types

    CryptoIkev2PolicyProposal, CryptoIkev2PolicyProposalArgs

    Proposals string
    Specify Proposal
    Proposals string
    Specify Proposal
    proposals String
    Specify Proposal
    proposals string
    Specify Proposal
    proposals str
    Specify Proposal
    proposals String
    Specify Proposal

    Import

     $ pulumi import iosxe:index/cryptoIkev2Policy:CryptoIkev2Policy example "Cisco-IOS-XE-native:native/crypto/Cisco-IOS-XE-crypto:ikev2/policy=policy1"
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    iosxe lbrlabs/pulumi-iosxe
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the iosxe Terraform Provider.
    iosxe logo
    Cisco IOS XE v0.0.1 published on Friday, Sep 22, 2023 by lbrlabs