import { InstanceService } from '@renovosolutions/cdk-library-renovo-instance-service'
new InstanceService(scope: Construct, id: string, props: InstanceServiceProps)| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
No description. |
id |
string |
No description. |
props |
InstanceServiceProps |
No description. |
- Type: constructs.Construct
- Type: string
- Type: InstanceServiceProps
| Name | Description |
|---|---|
toString |
Returns a string representation of this construct. |
public toString(): stringReturns a string representation of this construct.
| Name | Description |
|---|---|
isConstruct |
Checks if x is a construct. |
import { InstanceService } from '@renovosolutions/cdk-library-renovo-instance-service'
InstanceService.isConstruct(x: any)Checks if x is a construct.
- Type: any
Any object.
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
instance |
aws-cdk-lib.aws_ec2.Instance |
The underlying instance resource. |
instanceAvailabilityZone |
string |
The availability zone of the instance. |
instanceCfn |
aws-cdk-lib.aws_ec2.CfnInstance |
The underlying CfnInstance resource. |
instanceEc2PrivateDnsName |
string |
Private DNS name for this instance assigned by EC2. |
instanceEc2PublicDnsName |
string |
Public DNS name for this instance assigned by EC2. |
instanceId |
string |
The instance's ID. |
instancePrivateIp |
string |
Private IP for this instance. |
instanceProfile |
aws-cdk-lib.aws_iam.CfnInstanceProfile |
The instance profile associated with this instance. |
instanceRole |
@renovosolutions/cdk-library-managed-instance-role.ManagedInstanceRole |
The instance role associated with this instance. |
osType |
aws-cdk-lib.aws_ec2.OperatingSystemType |
The type of OS the instance is running. |
securityGroup |
aws-cdk-lib.aws_ec2.SecurityGroup |
The security group associated with this instance. |
instanceDnsName |
aws-cdk-lib.aws_route53.ARecord |
DNS record for this instance created in Route53. |
public readonly node: Node;- Type: constructs.Node
The tree node.
public readonly instance: Instance;- Type: aws-cdk-lib.aws_ec2.Instance
The underlying instance resource.
public readonly instanceAvailabilityZone: string;- Type: string
The availability zone of the instance.
public readonly instanceCfn: CfnInstance;- Type: aws-cdk-lib.aws_ec2.CfnInstance
The underlying CfnInstance resource.
public readonly instanceEc2PrivateDnsName: string;- Type: string
Private DNS name for this instance assigned by EC2.
public readonly instanceEc2PublicDnsName: string;- Type: string
Public DNS name for this instance assigned by EC2.
public readonly instanceId: string;- Type: string
The instance's ID.
public readonly instancePrivateIp: string;- Type: string
Private IP for this instance.
public readonly instanceProfile: CfnInstanceProfile;- Type: aws-cdk-lib.aws_iam.CfnInstanceProfile
The instance profile associated with this instance.
public readonly instanceRole: ManagedInstanceRole;- Type: @renovosolutions/cdk-library-managed-instance-role.ManagedInstanceRole
The instance role associated with this instance.
public readonly osType: OperatingSystemType;- Type: aws-cdk-lib.aws_ec2.OperatingSystemType
The type of OS the instance is running.
public readonly securityGroup: SecurityGroup;- Type: aws-cdk-lib.aws_ec2.SecurityGroup
The security group associated with this instance.
public readonly instanceDnsName: ARecord;- Type: aws-cdk-lib.aws_route53.ARecord
DNS record for this instance created in Route53.
import { ManagedLoggingPolicy } from '@renovosolutions/cdk-library-renovo-instance-service'
new ManagedLoggingPolicy(scope: Construct, id: string, props: ManagedLoggingPolicyProps)| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
No description. |
id |
string |
No description. |
props |
ManagedLoggingPolicyProps |
No description. |
- Type: constructs.Construct
- Type: string
| Name | Description |
|---|---|
toString |
Returns a string representation of this construct. |
public toString(): stringReturns a string representation of this construct.
| Name | Description |
|---|---|
isConstruct |
Checks if x is a construct. |
import { ManagedLoggingPolicy } from '@renovosolutions/cdk-library-renovo-instance-service'
ManagedLoggingPolicy.isConstruct(x: any)Checks if x is a construct.
- Type: any
Any object.
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
policy |
aws-cdk-lib.aws_iam.ManagedPolicy |
No description. |
public readonly node: Node;- Type: constructs.Node
The tree node.
public readonly policy: ManagedPolicy;- Type: aws-cdk-lib.aws_iam.ManagedPolicy
import { AmiLookup } from '@renovosolutions/cdk-library-renovo-instance-service'
const amiLookup: AmiLookup = { ... }| Name | Type | Description |
|---|---|---|
name |
string |
The name string to use for AMI lookup. |
owners |
string[] |
The owners to use for AMI lookup. |
windows |
boolean |
Is this AMI expected to be windows? |
public readonly name: string;- Type: string
The name string to use for AMI lookup.
public readonly owners: string[];- Type: string[]
The owners to use for AMI lookup.
public readonly windows: boolean;- Type: boolean
Is this AMI expected to be windows?
import { InstanceServiceProps } from '@renovosolutions/cdk-library-renovo-instance-service'
const instanceServiceProps: InstanceServiceProps = { ... }| Name | Type | Description |
|---|---|---|
instanceType |
aws-cdk-lib.aws_ec2.InstanceType |
The type of instance to launch. |
machineImage |
aws-cdk-lib.aws_ec2.IMachineImage |
AMI to launch. |
name |
string |
The name of the service the instance is for. |
vpc |
aws-cdk-lib.aws_ec2.IVpc |
The VPC to launch the instance in. |
allowAllOutbound |
boolean |
Whether the instance could initiate connections to anywhere by default. |
availabilityZones |
string[] |
Select subnets only in the given AZs. |
blockDevices |
aws-cdk-lib.aws_ec2.BlockDevice[] |
Specifies how block devices are exposed to the instance. |
disableInlineRules |
boolean |
Whether to disable inline ingress and egress rule optimization for the instances security group. |
enableCloudwatchLogs |
boolean |
Whether or not to enable logging to Cloudwatch Logs. |
enabledNoPublicIngressAspect |
boolean |
Whether or not to prevent security group from containing rules that allow access from the public internet: Any rule with a source from 0.0.0.0/0 or ::/0. |
enableNoDBPortsAspect |
boolean |
Whether or not to prevent security group from containing rules that allow access to relational DB ports: MySQL, PostgreSQL, MariaDB, Oracle, SQL Server. |
enableNoRemoteManagementPortsAspect |
boolean |
Whether or not to prevent security group from containing rules that allow access to remote management ports: SSH, RDP, WinRM, WinRM over HTTPs. |
instanceRole |
@renovosolutions/cdk-library-managed-instance-role.ManagedInstanceRole |
The role to use for this instance. |
keyName |
string |
Name of the SSH keypair to grant access to the instance. |
parentDomain |
string |
The parent domain of the service. |
privateIpAddress |
string |
Defines a private IP address to associate with the instance. |
requireImdsv2 |
boolean |
Whether IMDSv2 should be required on this instance. |
securityGroup |
aws-cdk-lib.aws_ec2.SecurityGroup |
The security group to use for this instance. |
subnetType |
aws-cdk-lib.aws_ec2.SubnetType |
The subnet type to launch this service in. |
useImdsv2CustomAspect |
boolean |
Whether to use th IMDSv2 custom aspect provided by this library or the default one provided by AWS. |
userData |
aws-cdk-lib.aws_ec2.UserData |
The user data to apply to the instance. |
public readonly instanceType: InstanceType;- Type: aws-cdk-lib.aws_ec2.InstanceType
The type of instance to launch.
public readonly machineImage: IMachineImage;- Type: aws-cdk-lib.aws_ec2.IMachineImage
AMI to launch.
public readonly name: string;- Type: string
The name of the service the instance is for.
public readonly vpc: IVpc;- Type: aws-cdk-lib.aws_ec2.IVpc
The VPC to launch the instance in.
public readonly allowAllOutbound: boolean;- Type: boolean
Whether the instance could initiate connections to anywhere by default.
public readonly availabilityZones: string[];- Type: string[]
Select subnets only in the given AZs.
public readonly blockDevices: BlockDevice[];- Type: aws-cdk-lib.aws_ec2.BlockDevice[]
Specifies how block devices are exposed to the instance.
You can specify virtual devices and EBS volumes
public readonly disableInlineRules: boolean;- Type: boolean
- Default: false
Whether to disable inline ingress and egress rule optimization for the instances security group.
If this is set to true, ingress and egress rules will not be declared under the SecurityGroup in cloudformation, but will be separate elements.
Inlining rules is an optimization for producing smaller stack templates. Sometimes this is not desirable, for example when security group access is managed via tags.
The default value can be overriden globally by setting the context variable '@aws-cdk/aws-ec2.securityGroupDisableInlineRules'.
public readonly enableCloudwatchLogs: boolean;- Type: boolean
- Default: true
Whether or not to enable logging to Cloudwatch Logs.
public readonly enabledNoPublicIngressAspect: boolean;- Type: boolean
Whether or not to prevent security group from containing rules that allow access from the public internet: Any rule with a source from 0.0.0.0/0 or ::/0.
If these sources are used when this is enabled and error will be added to CDK metadata and deployment and synth will fail.
public readonly enableNoDBPortsAspect: boolean;- Type: boolean
- Default: true
Whether or not to prevent security group from containing rules that allow access to relational DB ports: MySQL, PostgreSQL, MariaDB, Oracle, SQL Server.
If these ports are opened when this is enabled an error will be added to CDK metadata and deployment and synth will fail.
public readonly enableNoRemoteManagementPortsAspect: boolean;- Type: boolean
- Default: true
Whether or not to prevent security group from containing rules that allow access to remote management ports: SSH, RDP, WinRM, WinRM over HTTPs.
If these ports are opened when this is enabled an error will be added to CDK metadata and deployment and synth will fail.
public readonly instanceRole: ManagedInstanceRole;- Type: @renovosolutions/cdk-library-managed-instance-role.ManagedInstanceRole
- Default: A new ManagedInstanceRole will be created for this instance
The role to use for this instance.
public readonly keyName: string;- Type: string
Name of the SSH keypair to grant access to the instance.
public readonly parentDomain: string;- Type: string
The parent domain of the service.
public readonly privateIpAddress: string;- Type: string
Defines a private IP address to associate with the instance.
public readonly requireImdsv2: boolean;- Type: boolean
- Default: true
Whether IMDSv2 should be required on this instance.
public readonly securityGroup: SecurityGroup;- Type: aws-cdk-lib.aws_ec2.SecurityGroup
- Default: A new SecurityGroup will be created for this instance
The security group to use for this instance.
public readonly subnetType: SubnetType;- Type: aws-cdk-lib.aws_ec2.SubnetType
- Default: ec2.SubnetType.PRIVATE_WITH_NAT
The subnet type to launch this service in.
public readonly useImdsv2CustomAspect: boolean;- Type: boolean
- Default: true
Whether to use th IMDSv2 custom aspect provided by this library or the default one provided by AWS.
Turned on by default otherwise we need to apply a feature flag to every project using an instance or apply a breaking change to instance construct ids.
public readonly userData: UserData;- Type: aws-cdk-lib.aws_ec2.UserData
The user data to apply to the instance.
import { ManagedLoggingPolicyProps } from '@renovosolutions/cdk-library-renovo-instance-service'
const managedLoggingPolicyProps: ManagedLoggingPolicyProps = { ... }| Name | Type | Description |
|---|---|---|
os |
string |
The OS of the instance this policy is for. |
public readonly os: string;- Type: string
The OS of the instance this policy is for.