com.pulumi.meraki.networks.SwitchAccessControlLists Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of meraki Show documentation
Show all versions of meraki Show documentation
A Pulumi package for creating and managing Cisco Meraki resources
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.meraki.networks;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import com.pulumi.meraki.Utilities;
import com.pulumi.meraki.networks.SwitchAccessControlListsArgs;
import com.pulumi.meraki.networks.inputs.SwitchAccessControlListsState;
import com.pulumi.meraki.networks.outputs.SwitchAccessControlListsRule;
import com.pulumi.meraki.networks.outputs.SwitchAccessControlListsRulesResponse;
import java.lang.String;
import java.util.List;
import javax.annotation.Nullable;
/**
* ## Example Usage
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.meraki.networks.SwitchAccessControlLists;
* import com.pulumi.meraki.networks.SwitchAccessControlListsArgs;
* import com.pulumi.meraki.networks.inputs.SwitchAccessControlListsRuleArgs;
* 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 SwitchAccessControlLists("example", SwitchAccessControlListsArgs.builder()
* .networkId("string")
* .rules(SwitchAccessControlListsRuleArgs.builder()
* .comment("Deny SSH")
* .dst_cidr("172.16.30/24")
* .dst_port("22")
* .ip_version("ipv4")
* .policy("deny")
* .protocol("tcp")
* .src_cidr("10.1.10.0/24")
* .src_port("any")
* .vlan("10")
* .build())
* .build());
*
* ctx.export("merakiNetworksSwitchAccessControlListsExample", example);
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
* ## Import
*
* ```sh
* $ pulumi import meraki:networks/switchAccessControlLists:SwitchAccessControlLists example "network_id"
* ```
*
*/
@ResourceType(type="meraki:networks/switchAccessControlLists:SwitchAccessControlLists")
public class SwitchAccessControlLists extends com.pulumi.resources.CustomResource {
/**
* networkId path parameter. Network ID
*
*/
@Export(name="networkId", refs={String.class}, tree="[0]")
private Output networkId;
/**
* @return networkId path parameter. Network ID
*
*/
public Output networkId() {
return this.networkId;
}
/**
* An ordered array of the access control list rules
*
*/
@Export(name="rules", refs={List.class,SwitchAccessControlListsRule.class}, tree="[0,1]")
private Output> rules;
/**
* @return An ordered array of the access control list rules
*
*/
public Output> rules() {
return this.rules;
}
/**
* An ordered array of the access control list rules
*
*/
@Export(name="rulesResponses", refs={List.class,SwitchAccessControlListsRulesResponse.class}, tree="[0,1]")
private Output> rulesResponses;
/**
* @return An ordered array of the access control list rules
*
*/
public Output> rulesResponses() {
return this.rulesResponses;
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public SwitchAccessControlLists(java.lang.String name) {
this(name, SwitchAccessControlListsArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public SwitchAccessControlLists(java.lang.String name, SwitchAccessControlListsArgs args) {
this(name, args, null);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
* @param options A bag of options that control this resource's behavior.
*/
public SwitchAccessControlLists(java.lang.String name, SwitchAccessControlListsArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("meraki:networks/switchAccessControlLists:SwitchAccessControlLists", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private SwitchAccessControlLists(java.lang.String name, Output id, @Nullable SwitchAccessControlListsState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("meraki:networks/switchAccessControlLists:SwitchAccessControlLists", name, state, makeResourceOptions(options, id), false);
}
private static SwitchAccessControlListsArgs makeArgs(SwitchAccessControlListsArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? SwitchAccessControlListsArgs.Empty : args;
}
private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) {
var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder()
.version(Utilities.getVersion())
.build();
return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id);
}
/**
* Get an existing Host 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
* @param options Optional settings to control the behavior of the CustomResource.
*/
public static SwitchAccessControlLists get(java.lang.String name, Output id, @Nullable SwitchAccessControlListsState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new SwitchAccessControlLists(name, id, state, options);
}
}