com.aliyun.ros.cdk.apigateway.Instance Maven / Gradle / Ivy
Show all versions of ros-cdk-apigateway Show documentation
package com.aliyun.ros.cdk.apigateway;
/**
* This class encapsulates and extends the ROS resource type ALIYUN::ApiGateway::Instance
, which is used to create a dedicated instance.
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.85.0 (build 08ee592)", date = "2024-12-13T06:45:04.322Z")
@software.amazon.jsii.Jsii(module = com.aliyun.ros.cdk.apigateway.$Module.class, fqn = "@alicloud/ros-cdk-apigateway.Instance")
public class Instance extends com.aliyun.ros.cdk.core.Resource {
protected Instance(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
protected Instance(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
super(initializationMode);
}
/**
* Param scope - scope in which this resource is defined Param id - scoped id of the resource Param props - resource properties.
*
* @param scope This parameter is required.
* @param id This parameter is required.
* @param props This parameter is required.
* @param enableResourcePropertyConstraint
*/
public Instance(final @org.jetbrains.annotations.NotNull com.aliyun.ros.cdk.core.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull com.aliyun.ros.cdk.apigateway.InstanceProps props, final @org.jetbrains.annotations.Nullable java.lang.Boolean enableResourcePropertyConstraint) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(props, "props is required"), enableResourcePropertyConstraint });
}
/**
* Param scope - scope in which this resource is defined Param id - scoped id of the resource Param props - resource properties.
*
* @param scope This parameter is required.
* @param id This parameter is required.
* @param props This parameter is required.
*/
public Instance(final @org.jetbrains.annotations.NotNull com.aliyun.ros.cdk.core.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull com.aliyun.ros.cdk.apigateway.InstanceProps props) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(props, "props is required") });
}
/**
* Attribute EgressIpv6Enable: Whether enable egress IPV6.
*/
public @org.jetbrains.annotations.NotNull com.aliyun.ros.cdk.core.IResolvable getAttrEgressIpv6Enable() {
return software.amazon.jsii.Kernel.get(this, "attrEgressIpv6Enable", software.amazon.jsii.NativeType.forClass(com.aliyun.ros.cdk.core.IResolvable.class));
}
/**
* Attribute InstanceId: Instance ID.
*/
public @org.jetbrains.annotations.NotNull com.aliyun.ros.cdk.core.IResolvable getAttrInstanceId() {
return software.amazon.jsii.Kernel.get(this, "attrInstanceId", software.amazon.jsii.NativeType.forClass(com.aliyun.ros.cdk.core.IResolvable.class));
}
/**
* Attribute InstanceType: Instance type.
*/
public @org.jetbrains.annotations.NotNull com.aliyun.ros.cdk.core.IResolvable getAttrInstanceType() {
return software.amazon.jsii.Kernel.get(this, "attrInstanceType", software.amazon.jsii.NativeType.forClass(com.aliyun.ros.cdk.core.IResolvable.class));
}
/**
* Attribute InternetEgressAddress: Internet egress dddress.
*/
public @org.jetbrains.annotations.NotNull com.aliyun.ros.cdk.core.IResolvable getAttrInternetEgressAddress() {
return software.amazon.jsii.Kernel.get(this, "attrInternetEgressAddress", software.amazon.jsii.NativeType.forClass(com.aliyun.ros.cdk.core.IResolvable.class));
}
/**
* Attribute SupportIpv6: Whether support IPV6.
*/
public @org.jetbrains.annotations.NotNull com.aliyun.ros.cdk.core.IResolvable getAttrSupportIpv6() {
return software.amazon.jsii.Kernel.get(this, "attrSupportIpv6", software.amazon.jsii.NativeType.forClass(com.aliyun.ros.cdk.core.IResolvable.class));
}
/**
* Attribute VpcEgressAddress: VPC network egress address.
*/
public @org.jetbrains.annotations.NotNull com.aliyun.ros.cdk.core.IResolvable getAttrVpcEgressAddress() {
return software.amazon.jsii.Kernel.get(this, "attrVpcEgressAddress", software.amazon.jsii.NativeType.forClass(com.aliyun.ros.cdk.core.IResolvable.class));
}
/**
* Attribute VpcIntranetEnable: Whether enable VPC intranet.
*/
public @org.jetbrains.annotations.NotNull com.aliyun.ros.cdk.core.IResolvable getAttrVpcIntranetEnable() {
return software.amazon.jsii.Kernel.get(this, "attrVpcIntranetEnable", software.amazon.jsii.NativeType.forClass(com.aliyun.ros.cdk.core.IResolvable.class));
}
/**
* Attribute VpcSlbIntranetEnable: Whether enable VPC SLB intranet.
*/
public @org.jetbrains.annotations.NotNull com.aliyun.ros.cdk.core.IResolvable getAttrVpcSlbIntranetEnable() {
return software.amazon.jsii.Kernel.get(this, "attrVpcSlbIntranetEnable", software.amazon.jsii.NativeType.forClass(com.aliyun.ros.cdk.core.IResolvable.class));
}
protected @org.jetbrains.annotations.NotNull java.lang.Boolean getEnableResourcePropertyConstraint() {
return software.amazon.jsii.Kernel.get(this, "enableResourcePropertyConstraint", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class));
}
protected void setEnableResourcePropertyConstraint(final @org.jetbrains.annotations.NotNull java.lang.Boolean value) {
software.amazon.jsii.Kernel.set(this, "enableResourcePropertyConstraint", java.util.Objects.requireNonNull(value, "enableResourcePropertyConstraint is required"));
}
protected @org.jetbrains.annotations.NotNull java.lang.String getId() {
return software.amazon.jsii.Kernel.get(this, "id", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
protected void setId(final @org.jetbrains.annotations.NotNull java.lang.String value) {
software.amazon.jsii.Kernel.set(this, "id", java.util.Objects.requireNonNull(value, "id is required"));
}
protected @org.jetbrains.annotations.NotNull com.aliyun.ros.cdk.apigateway.InstanceProps getProps() {
return software.amazon.jsii.Kernel.get(this, "props", software.amazon.jsii.NativeType.forClass(com.aliyun.ros.cdk.apigateway.InstanceProps.class));
}
protected void setProps(final @org.jetbrains.annotations.NotNull com.aliyun.ros.cdk.apigateway.InstanceProps value) {
software.amazon.jsii.Kernel.set(this, "props", java.util.Objects.requireNonNull(value, "props is required"));
}
protected @org.jetbrains.annotations.NotNull com.aliyun.ros.cdk.core.Construct getScope() {
return software.amazon.jsii.Kernel.get(this, "scope", software.amazon.jsii.NativeType.forClass(com.aliyun.ros.cdk.core.Construct.class));
}
protected void setScope(final @org.jetbrains.annotations.NotNull com.aliyun.ros.cdk.core.Construct value) {
software.amazon.jsii.Kernel.set(this, "scope", java.util.Objects.requireNonNull(value, "scope is required"));
}
/**
* A fluent builder for {@link com.aliyun.ros.cdk.apigateway.Instance}.
*/
public static final class Builder implements software.amazon.jsii.Builder {
/**
* @return a new instance of {@link Builder}.
* @param scope This parameter is required.
* @param id This parameter is required.
* @param enableResourcePropertyConstraint
*/
public static Builder create(final com.aliyun.ros.cdk.core.Construct scope, final java.lang.String id, final java.lang.Boolean enableResourcePropertyConstraint) {
return new Builder(scope, id, enableResourcePropertyConstraint);
}
/**
* @return a new instance of {@link Builder}.
* @param scope This parameter is required.
* @param id This parameter is required.
*/
public static Builder create(final com.aliyun.ros.cdk.core.Construct scope, final java.lang.String id) {
return new Builder(scope, id, null);
}
private final com.aliyun.ros.cdk.core.Construct scope;
private final java.lang.String id;
private final java.lang.Boolean enableResourcePropertyConstraint;
private final com.aliyun.ros.cdk.apigateway.InstanceProps.Builder props;
private Builder(final com.aliyun.ros.cdk.core.Construct scope, final java.lang.String id, final java.lang.Boolean enableResourcePropertyConstraint) {
this.scope = scope;
this.id = id;
this.enableResourcePropertyConstraint = enableResourcePropertyConstraint;
this.props = new com.aliyun.ros.cdk.apigateway.InstanceProps.Builder();
}
/**
* Property httpsPolicy: HTTPS security policy.
*
* Valid values: HTTPS2_TLS1_0, HTTPS2_TLS1_2, HTTPS1_1_TLS1_0
*
* @return {@code this}
* @param httpsPolicy Property httpsPolicy: HTTPS security policy. This parameter is required.
*/
public Builder httpsPolicy(final java.lang.String httpsPolicy) {
this.props.httpsPolicy(httpsPolicy);
return this;
}
/**
* Property httpsPolicy: HTTPS security policy.
*
* Valid values: HTTPS2_TLS1_0, HTTPS2_TLS1_2, HTTPS1_1_TLS1_0
*
* @return {@code this}
* @param httpsPolicy Property httpsPolicy: HTTPS security policy. This parameter is required.
*/
public Builder httpsPolicy(final com.aliyun.ros.cdk.core.IResolvable httpsPolicy) {
this.props.httpsPolicy(httpsPolicy);
return this;
}
/**
* Property instanceName: Instance name.
*
* @return {@code this}
* @param instanceName Property instanceName: Instance name. This parameter is required.
*/
public Builder instanceName(final java.lang.String instanceName) {
this.props.instanceName(instanceName);
return this;
}
/**
* Property instanceName: Instance name.
*
* @return {@code this}
* @param instanceName Property instanceName: Instance name. This parameter is required.
*/
public Builder instanceName(final com.aliyun.ros.cdk.core.IResolvable instanceName) {
this.props.instanceName(instanceName);
return this;
}
/**
* Property instanceSpec: Instance specification.
*
* For example: api.s1.small
*
* @return {@code this}
* @param instanceSpec Property instanceSpec: Instance specification. This parameter is required.
*/
public Builder instanceSpec(final java.lang.String instanceSpec) {
this.props.instanceSpec(instanceSpec);
return this;
}
/**
* Property instanceSpec: Instance specification.
*
* For example: api.s1.small
*
* @return {@code this}
* @param instanceSpec Property instanceSpec: Instance specification. This parameter is required.
*/
public Builder instanceSpec(final com.aliyun.ros.cdk.core.IResolvable instanceSpec) {
this.props.instanceSpec(instanceSpec);
return this;
}
/**
* Property zoneId: Zone to which the instance belongs.
*
* For example: cn-beijing-MAZ2(f,g).
* Pleas call DescribeZones to get supported zone list.
*
* @return {@code this}
* @param zoneId Property zoneId: Zone to which the instance belongs. This parameter is required.
*/
public Builder zoneId(final java.lang.String zoneId) {
this.props.zoneId(zoneId);
return this;
}
/**
* Property zoneId: Zone to which the instance belongs.
*
* For example: cn-beijing-MAZ2(f,g).
* Pleas call DescribeZones to get supported zone list.
*
* @return {@code this}
* @param zoneId Property zoneId: Zone to which the instance belongs. This parameter is required.
*/
public Builder zoneId(final com.aliyun.ros.cdk.core.IResolvable zoneId) {
this.props.zoneId(zoneId);
return this;
}
/**
* Property autoPay: Indicates whether automatic payment is enabled.
*
* Valid values:
* false: Automatic payment is disabled. You need to go to Orders to make the payment once an order is generated.
* true: Automatic payment is enabled. The payment is automatically made.
* Default true.
*
* @return {@code this}
* @param autoPay Property autoPay: Indicates whether automatic payment is enabled. This parameter is required.
*/
public Builder autoPay(final java.lang.Boolean autoPay) {
this.props.autoPay(autoPay);
return this;
}
/**
* Property autoPay: Indicates whether automatic payment is enabled.
*
* Valid values:
* false: Automatic payment is disabled. You need to go to Orders to make the payment once an order is generated.
* true: Automatic payment is enabled. The payment is automatically made.
* Default true.
*
* @return {@code this}
* @param autoPay Property autoPay: Indicates whether automatic payment is enabled. This parameter is required.
*/
public Builder autoPay(final com.aliyun.ros.cdk.core.IResolvable autoPay) {
this.props.autoPay(autoPay);
return this;
}
/**
* Property chargeType: The billing method of the router interface.
*
* Valid values: PrePaid (Subscription), PostPaid (default, Pay-As-You-Go). Default value: PostPaid.
*
* @return {@code this}
* @param chargeType Property chargeType: The billing method of the router interface. This parameter is required.
*/
public Builder chargeType(final java.lang.String chargeType) {
this.props.chargeType(chargeType);
return this;
}
/**
* Property chargeType: The billing method of the router interface.
*
* Valid values: PrePaid (Subscription), PostPaid (default, Pay-As-You-Go). Default value: PostPaid.
*
* @return {@code this}
* @param chargeType Property chargeType: The billing method of the router interface. This parameter is required.
*/
public Builder chargeType(final com.aliyun.ros.cdk.core.IResolvable chargeType) {
this.props.chargeType(chargeType);
return this;
}
/**
* Property deletionForce: Whether force delete the instance even if its status is START_FAILED.
*
* Default value is false.
*
* @return {@code this}
* @param deletionForce Property deletionForce: Whether force delete the instance even if its status is START_FAILED. This parameter is required.
*/
public Builder deletionForce(final java.lang.Boolean deletionForce) {
this.props.deletionForce(deletionForce);
return this;
}
/**
* Property deletionForce: Whether force delete the instance even if its status is START_FAILED.
*
* Default value is false.
*
* @return {@code this}
* @param deletionForce Property deletionForce: Whether force delete the instance even if its status is START_FAILED. This parameter is required.
*/
public Builder deletionForce(final com.aliyun.ros.cdk.core.IResolvable deletionForce) {
this.props.deletionForce(deletionForce);
return this;
}
/**
* Property duration: Prepaid time period.
*
* It could be from 1 to 9 when PricingCycle is Month, or 1 to 3 when PricingCycle is Year. Default value is 3.
*
* @return {@code this}
* @param duration Property duration: Prepaid time period. This parameter is required.
*/
public Builder duration(final java.lang.Number duration) {
this.props.duration(duration);
return this;
}
/**
* Property duration: Prepaid time period.
*
* It could be from 1 to 9 when PricingCycle is Month, or 1 to 3 when PricingCycle is Year. Default value is 3.
*
* @return {@code this}
* @param duration Property duration: Prepaid time period. This parameter is required.
*/
public Builder duration(final com.aliyun.ros.cdk.core.IResolvable duration) {
this.props.duration(duration);
return this;
}
/**
* Property pricingCycle: Unit of the payment cycle.
*
* It could be Month (default) or Year.
*
* @return {@code this}
* @param pricingCycle Property pricingCycle: Unit of the payment cycle. This parameter is required.
*/
public Builder pricingCycle(final java.lang.String pricingCycle) {
this.props.pricingCycle(pricingCycle);
return this;
}
/**
* Property pricingCycle: Unit of the payment cycle.
*
* It could be Month (default) or Year.
*
* @return {@code this}
* @param pricingCycle Property pricingCycle: Unit of the payment cycle. This parameter is required.
*/
public Builder pricingCycle(final com.aliyun.ros.cdk.core.IResolvable pricingCycle) {
this.props.pricingCycle(pricingCycle);
return this;
}
/**
* Property tags: Tags to attach to instance.
*
* Max support 20 tags to add during create instance. Each tag with two properties Key and Value, and Key is required.
*
* @return {@code this}
* @param tags Property tags: Tags to attach to instance. This parameter is required.
*/
public Builder tags(final java.util.List extends com.aliyun.ros.cdk.apigateway.RosInstance.TagsProperty> tags) {
this.props.tags(tags);
return this;
}
/**
* @return a newly built instance of {@link com.aliyun.ros.cdk.apigateway.Instance}.
*/
@Override
public com.aliyun.ros.cdk.apigateway.Instance build() {
return new com.aliyun.ros.cdk.apigateway.Instance(
this.scope,
this.id,
this.props.build(),
this.enableResourcePropertyConstraint
);
}
}
}