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

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",
            },
        },
    });

});
Copy
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
	})
}
Copy
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());

    }
}
Copy
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",
    }],
});
Copy
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",
    )])
Copy
resources:
  example:
    type: iosxe:CryptoIkev2Policy
    properties:
      matchAddressLocalIps:
        - 1.2.3.4
      matchFvrfAny: true
      proposals:
        - proposals: proposal123
Copy

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 This property is required. string
The unique name of the resource.
args This property is required. CryptoIkev2PolicyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. 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 This property is required. string
The unique name of the resource.
args This property is required. CryptoIkev2PolicyArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. CryptoIkev2PolicyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. CryptoIkev2PolicyArgs
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 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",
});
Copy
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"),
})
Copy
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());
Copy
crypto_ikev2_policy_resource = iosxe.CryptoIkev2Policy("cryptoIkev2PolicyResource",
    proposals=[{
        "proposals": "string",
    }],
    device="string",
    match_address_local_ips=["string"],
    match_fvrf="string",
    match_fvrf_any=False,
    match_inbound_only=False,
    name="string")
Copy
const cryptoIkev2PolicyResource = new iosxe.CryptoIkev2Policy("cryptoIkev2PolicyResource", {
    proposals: [{
        proposals: "string",
    }],
    device: "string",
    matchAddressLocalIps: ["string"],
    matchFvrf: "string",
    matchFvrfAny: false,
    matchInboundOnly: false,
    name: "string",
});
Copy
type: iosxe:CryptoIkev2Policy
properties:
    device: string
    matchAddressLocalIps:
        - string
    matchFvrf: string
    matchFvrfAny: false
    matchInboundOnly: false
    name: string
    proposals:
        - proposals: string
Copy

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

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The CryptoIkev2Policy resource accepts the following input properties:

Proposals This property is required. 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 This property is required. []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 This property is required. 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 This property is required. 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 This property is required. 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 This property is required. 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)
resources:  _:    type: iosxe:CryptoIkev2Policy    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required. string
Specify Proposal
Proposals This property is required. string
Specify Proposal
proposals This property is required. String
Specify Proposal
proposals This property is required. string
Specify Proposal
proposals This property is required. str
Specify Proposal
proposals This property is required. String
Specify Proposal

Import

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

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.