@huaweicloudos/pulumi
Version:
A Pulumi package for creating and managing Huaweicloud cloud resources.
164 lines • 8.22 kB
JavaScript
;
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.Service = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Use this resource to register or unregister the Workspace service in HuaweiCloud.
*
* > **NOTE:** Only one resource can be created in a region.
*
* ## Example Usage
* ### Register the Workspace service and use local authentication
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as pulumi from "@huaweicloudos/pulumi";
*
* const config = new pulumi.Config();
* const vpcId = config.requireObject("vpcId");
* const networkIds = config.requireObject("networkIds");
* const test = new huaweicloud.workspace.Service("test", {
* accessMode: "INTERNET",
* vpcId: vpcId,
* networkIds: networkIds,
* otpConfigInfo: {
* enable: true,
* receiveMode: "VMFA",
* ruleType: "ACCESS_MODE",
* rule: "PRIVATE",
* },
* });
* ```
* ## Appendix
*
* <a name="secgroupRulesForAdDomainConnection"></a>
* If a firewall is deployed between Windows AD and the Workspace service, you need to open the following ports on the
* firewall for the desktops of Workspace service to connect to Windows AD or DNS:
*
* | Protocol | Ports | Usage |
* | ---- | ---- | ---- |
* | TCP | 135 | RPC protocol (required for LDAP, Distributed File System, and Distributed File Replication) |
* | UDP | 137 | NetBIOS name resolution (required by the network login service) |
* | UDP | 138 | NetBIOS datagram service (distributed file system, network login and other services need to use this port) |
* | TCP | 139 | NetBIOS-SSN Service (Network Basic I/O Interface) |
* | TCP | 445 | NetBIOS-SSN Service (Network Basic I/O Interface) |
* | UDP | 445 | NetBIOS-SSN Service (Network Basic I/O Interface) |
* | TCP | 49152-65535 | RPC dynamic ports (ports that are not hardened and open by AD. If AD is hardened, ports 50152-51151 need to be opened) |
* | UDP | 49152-65535 | RPC dynamic ports (ports that are not hardened and open by AD. If AD is hardened, ports 50152-51151 need to be opened) |
* | TCP | 88 | Kerberos Key Distribution Center Service |
* | UDP | 88 | Kerberos Key Distribution Center Service |
* | UDP | 123 | Port used by NTP service |
* | TCP | 389 | LDAP server |
* | UDP | 389 | LDAP server |
* | TCP | 464 | Kerberos authentication protocol |
* | UDP | 464 | Kerberos Authentication Protocol |
* | UDP | 500 | isakmp |
* | TCP | 593 | RPC over HTTP |
* | TCP | 636 | LDAP SSL |
* | TCP | 53 | DNS server |
* | UDP | 53 | DNS server |
*
* ## Import
*
* Service can be imported using the `id`, e.g. bash
*
* ```sh
* $ pulumi import huaweicloud:Workspace/service:Service test <id>
* ```
*
* 'NA' or other characters can be used to instead of the `id`. bash
*
* ```sh
* $ pulumi import huaweicloud:Workspace/service:Service test NA
* ```
*/
class Service extends pulumi.CustomResource {
/**
* Get an existing Service 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, id, state, opts) {
return new Service(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of Service. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj) {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === Service.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["accessMode"] = state ? state.accessMode : undefined;
resourceInputs["adDomain"] = state ? state.adDomain : undefined;
resourceInputs["authType"] = state ? state.authType : undefined;
resourceInputs["dedicatedSubnets"] = state ? state.dedicatedSubnets : undefined;
resourceInputs["desktopSecurityGroups"] = state ? state.desktopSecurityGroups : undefined;
resourceInputs["enterpriseId"] = state ? state.enterpriseId : undefined;
resourceInputs["infrastructureSecurityGroups"] = state ? state.infrastructureSecurityGroups : undefined;
resourceInputs["internetAccessAddress"] = state ? state.internetAccessAddress : undefined;
resourceInputs["internetAccessPort"] = state ? state.internetAccessPort : undefined;
resourceInputs["isLocked"] = state ? state.isLocked : undefined;
resourceInputs["lockEnabled"] = state ? state.lockEnabled : undefined;
resourceInputs["lockReason"] = state ? state.lockReason : undefined;
resourceInputs["lockTime"] = state ? state.lockTime : undefined;
resourceInputs["managementSubnetCidr"] = state ? state.managementSubnetCidr : undefined;
resourceInputs["networkIds"] = state ? state.networkIds : undefined;
resourceInputs["otpConfigInfo"] = state ? state.otpConfigInfo : undefined;
resourceInputs["region"] = state ? state.region : undefined;
resourceInputs["status"] = state ? state.status : undefined;
resourceInputs["vpcId"] = state ? state.vpcId : undefined;
}
else {
const args = argsOrState;
if ((!args || args.accessMode === undefined) && !opts.urn) {
throw new Error("Missing required property 'accessMode'");
}
if ((!args || args.networkIds === undefined) && !opts.urn) {
throw new Error("Missing required property 'networkIds'");
}
if ((!args || args.vpcId === undefined) && !opts.urn) {
throw new Error("Missing required property 'vpcId'");
}
resourceInputs["accessMode"] = args ? args.accessMode : undefined;
resourceInputs["adDomain"] = args ? args.adDomain : undefined;
resourceInputs["authType"] = args ? args.authType : undefined;
resourceInputs["dedicatedSubnets"] = args ? args.dedicatedSubnets : undefined;
resourceInputs["enterpriseId"] = args ? args.enterpriseId : undefined;
resourceInputs["internetAccessPort"] = args ? args.internetAccessPort : undefined;
resourceInputs["lockEnabled"] = args ? args.lockEnabled : undefined;
resourceInputs["managementSubnetCidr"] = args ? args.managementSubnetCidr : undefined;
resourceInputs["networkIds"] = args ? args.networkIds : undefined;
resourceInputs["otpConfigInfo"] = args ? args.otpConfigInfo : undefined;
resourceInputs["region"] = args ? args.region : undefined;
resourceInputs["vpcId"] = args ? args.vpcId : undefined;
resourceInputs["desktopSecurityGroups"] = undefined /*out*/;
resourceInputs["infrastructureSecurityGroups"] = undefined /*out*/;
resourceInputs["internetAccessAddress"] = undefined /*out*/;
resourceInputs["isLocked"] = undefined /*out*/;
resourceInputs["lockReason"] = undefined /*out*/;
resourceInputs["lockTime"] = undefined /*out*/;
resourceInputs["status"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Service.__pulumiType, name, resourceInputs, opts);
}
}
exports.Service = Service;
/** @internal */
Service.__pulumiType = 'huaweicloud:Workspace/service:Service';
//# sourceMappingURL=service.js.map