UNPKG

@pulumi/f5bigip

Version:

A Pulumi package for creating and managing F5 BigIP resources.

172 lines (171 loc) 6.49 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * `f5bigip.ltm.Policy` Configures ltm policies to manage traffic assigned to a virtual server * * For resources should be named with their `full path`. The full path is the combination of the `partition + name` of the resource. For example `/Common/test-policy`. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as f5bigip from "@pulumi/f5bigip"; * * const mypool = new f5bigip.ltm.Pool("mypool", { * name: "/Common/test-pool", * allowNat: "yes", * allowSnat: "yes", * loadBalancingMode: "round-robin", * }); * const test_policy = new f5bigip.ltm.Policy("test-policy", { * name: "/Common/test-policy", * strategy: "first-match", * requires: ["http"], * controls: ["forwarding"], * rules: [{ * name: "rule6", * actions: [{ * forward: true, * connection: false, * pool: mypool.name, * }], * }], * }, { * dependsOn: [mypool], * }); * ``` * * ## Importing * * An existing policy can be imported into this resource by supplying policy Name in `full path` as `id`. * An example is below: * ```sh * $ terraform import bigip_ltm_policy.policy-import-test /Common/policy2 * ``` */ export declare class Policy extends pulumi.CustomResource { /** * Get an existing Policy resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: PolicyState, opts?: pulumi.CustomResourceOptions): Policy; /** * Returns true if the given object is an instance of Policy. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is Policy; /** * Specifies the controls */ readonly controls: pulumi.Output<string[] | undefined>; /** * Specifies descriptive text that identifies the ltm policy. */ readonly description: pulumi.Output<string | undefined>; /** * Name of the Policy ( policy name should be in full path which is combination of partition and policy name ) */ readonly name: pulumi.Output<string>; /** * If you want to publish the policy else it will be deployed in Drafts mode. This attribute is deprecated and will be removed in a future release. * * @deprecated This attribute is not required anymore because the resource automatically publishes the policy, for that reason this field is deprecated and will be removed in a future release. */ readonly publishedCopy: pulumi.Output<string | undefined>; /** * Specifies the protocol */ readonly requires: pulumi.Output<string[] | undefined>; /** * List of Rules can be applied using the policy. Each rule is block type with following arguments. */ readonly rules: pulumi.Output<outputs.ltm.PolicyRule[] | undefined>; /** * Specifies the match strategy */ readonly strategy: pulumi.Output<string | undefined>; /** * Create a Policy resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: PolicyArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Policy resources. */ export interface PolicyState { /** * Specifies the controls */ controls?: pulumi.Input<pulumi.Input<string>[]>; /** * Specifies descriptive text that identifies the ltm policy. */ description?: pulumi.Input<string>; /** * Name of the Policy ( policy name should be in full path which is combination of partition and policy name ) */ name?: pulumi.Input<string>; /** * If you want to publish the policy else it will be deployed in Drafts mode. This attribute is deprecated and will be removed in a future release. * * @deprecated This attribute is not required anymore because the resource automatically publishes the policy, for that reason this field is deprecated and will be removed in a future release. */ publishedCopy?: pulumi.Input<string>; /** * Specifies the protocol */ requires?: pulumi.Input<pulumi.Input<string>[]>; /** * List of Rules can be applied using the policy. Each rule is block type with following arguments. */ rules?: pulumi.Input<pulumi.Input<inputs.ltm.PolicyRule>[]>; /** * Specifies the match strategy */ strategy?: pulumi.Input<string>; } /** * The set of arguments for constructing a Policy resource. */ export interface PolicyArgs { /** * Specifies the controls */ controls?: pulumi.Input<pulumi.Input<string>[]>; /** * Specifies descriptive text that identifies the ltm policy. */ description?: pulumi.Input<string>; /** * Name of the Policy ( policy name should be in full path which is combination of partition and policy name ) */ name: pulumi.Input<string>; /** * If you want to publish the policy else it will be deployed in Drafts mode. This attribute is deprecated and will be removed in a future release. * * @deprecated This attribute is not required anymore because the resource automatically publishes the policy, for that reason this field is deprecated and will be removed in a future release. */ publishedCopy?: pulumi.Input<string>; /** * Specifies the protocol */ requires?: pulumi.Input<pulumi.Input<string>[]>; /** * List of Rules can be applied using the policy. Each rule is block type with following arguments. */ rules?: pulumi.Input<pulumi.Input<inputs.ltm.PolicyRule>[]>; /** * Specifies the match strategy */ strategy?: pulumi.Input<string>; }