cdk-private-s3-hosting 0.0.1__py3-none-any.whl → 0.0.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -109,6 +109,7 @@ from ._jsii import *
109
109
  import aws_cdk.aws_certificatemanager as _aws_cdk_aws_certificatemanager_ceddda9d
110
110
  import aws_cdk.aws_ec2 as _aws_cdk_aws_ec2_ceddda9d
111
111
  import aws_cdk.aws_elasticloadbalancingv2 as _aws_cdk_aws_elasticloadbalancingv2_ceddda9d
112
+ import aws_cdk.aws_route53 as _aws_cdk_aws_route53_ceddda9d
112
113
  import aws_cdk.aws_s3 as _aws_cdk_aws_s3_ceddda9d
113
114
  import constructs as _constructs_77d1e7e8
114
115
 
@@ -130,16 +131,18 @@ class PrivateS3Hosting(
130
131
  certificate: typing.Optional[_aws_cdk_aws_certificatemanager_ceddda9d.ICertificate] = None,
131
132
  enable_private_dns: typing.Optional[builtins.bool] = None,
132
133
  internet_facing: typing.Optional[builtins.bool] = None,
134
+ sub_domain: typing.Optional[builtins.str] = None,
133
135
  vpc: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc] = None,
134
136
  ) -> None:
135
137
  '''
136
138
  :param scope: -
137
139
  :param id: -
138
140
  :param bucket_props: The properties for the S3 bucket. Default: - use default properties
139
- :param domain_name: The domain name for the website. This will be used to create the S3 bucket and the ALB listener
141
+ :param domain_name: The domain name for the website. S3 bucket name will be created with ``domainName``. If ``enablePrivateDns`` is enabled, a private hosted zone also will be created for the ``domainName`` and an A record has been created from ``domainName`` to the ALB DNS name.". If ``subDomein`` is provided, these names will be ``${subDomain}.${domainName}``.
140
142
  :param certificate: The certificate for the website. Default: - use HTTP
141
143
  :param enable_private_dns: Enable private DNS for the website. By eneabling this, a private hosted zone will be created for the domain name and an alias record will be created for the ALB You can access to the alb by the ``http(s)://<domainName>`` from the VPC Default: true
142
144
  :param internet_facing: Whether the ALB is internet facing. Default: false
145
+ :param sub_domain: The sub domain for the website. S3 bucket name will be created with ``${subDomain}.{domainName}``. If ``enablePrivateDns`` is enabled, a private hosted zone also will be created for the ``domainName`` and an A record has been created from ``${subDomain}.${domainName}`` to the ALB DNS name.". Default: - no sub domain
143
146
  :param vpc: The VPC for the website. Default: - create a new VPC with 2 AZs and 0 NAT gateways
144
147
  '''
145
148
  if __debug__:
@@ -152,6 +155,7 @@ class PrivateS3Hosting(
152
155
  certificate=certificate,
153
156
  enable_private_dns=enable_private_dns,
154
157
  internet_facing=internet_facing,
158
+ sub_domain=sub_domain,
155
159
  vpc=vpc,
156
160
  )
157
161
 
@@ -177,6 +181,12 @@ class PrivateS3Hosting(
177
181
  '''The VPC.'''
178
182
  return typing.cast(_aws_cdk_aws_ec2_ceddda9d.IVpc, jsii.get(self, "vpc"))
179
183
 
184
+ @builtins.property
185
+ @jsii.member(jsii_name="hostedZone")
186
+ def hosted_zone(self) -> typing.Optional[_aws_cdk_aws_route53_ceddda9d.IHostedZone]:
187
+ '''The hosted zone for the website.'''
188
+ return typing.cast(typing.Optional[_aws_cdk_aws_route53_ceddda9d.IHostedZone], jsii.get(self, "hostedZone"))
189
+
180
190
 
181
191
  @jsii.data_type(
182
192
  jsii_type="cdk-private-s3-hosting.PrivateS3HostingProps",
@@ -187,6 +197,7 @@ class PrivateS3Hosting(
187
197
  "certificate": "certificate",
188
198
  "enable_private_dns": "enablePrivateDns",
189
199
  "internet_facing": "internetFacing",
200
+ "sub_domain": "subDomain",
190
201
  "vpc": "vpc",
191
202
  },
192
203
  )
@@ -199,15 +210,17 @@ class PrivateS3HostingProps:
199
210
  certificate: typing.Optional[_aws_cdk_aws_certificatemanager_ceddda9d.ICertificate] = None,
200
211
  enable_private_dns: typing.Optional[builtins.bool] = None,
201
212
  internet_facing: typing.Optional[builtins.bool] = None,
213
+ sub_domain: typing.Optional[builtins.str] = None,
202
214
  vpc: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc] = None,
203
215
  ) -> None:
204
216
  '''Properties for PrivateS3Hosting.
205
217
 
206
218
  :param bucket_props: The properties for the S3 bucket. Default: - use default properties
207
- :param domain_name: The domain name for the website. This will be used to create the S3 bucket and the ALB listener
219
+ :param domain_name: The domain name for the website. S3 bucket name will be created with ``domainName``. If ``enablePrivateDns`` is enabled, a private hosted zone also will be created for the ``domainName`` and an A record has been created from ``domainName`` to the ALB DNS name.". If ``subDomein`` is provided, these names will be ``${subDomain}.${domainName}``.
208
220
  :param certificate: The certificate for the website. Default: - use HTTP
209
221
  :param enable_private_dns: Enable private DNS for the website. By eneabling this, a private hosted zone will be created for the domain name and an alias record will be created for the ALB You can access to the alb by the ``http(s)://<domainName>`` from the VPC Default: true
210
222
  :param internet_facing: Whether the ALB is internet facing. Default: false
223
+ :param sub_domain: The sub domain for the website. S3 bucket name will be created with ``${subDomain}.{domainName}``. If ``enablePrivateDns`` is enabled, a private hosted zone also will be created for the ``domainName`` and an A record has been created from ``${subDomain}.${domainName}`` to the ALB DNS name.". Default: - no sub domain
211
224
  :param vpc: The VPC for the website. Default: - create a new VPC with 2 AZs and 0 NAT gateways
212
225
  '''
213
226
  if isinstance(bucket_props, dict):
@@ -219,6 +232,7 @@ class PrivateS3HostingProps:
219
232
  check_type(argname="argument certificate", value=certificate, expected_type=type_hints["certificate"])
220
233
  check_type(argname="argument enable_private_dns", value=enable_private_dns, expected_type=type_hints["enable_private_dns"])
221
234
  check_type(argname="argument internet_facing", value=internet_facing, expected_type=type_hints["internet_facing"])
235
+ check_type(argname="argument sub_domain", value=sub_domain, expected_type=type_hints["sub_domain"])
222
236
  check_type(argname="argument vpc", value=vpc, expected_type=type_hints["vpc"])
223
237
  self._values: typing.Dict[builtins.str, typing.Any] = {
224
238
  "bucket_props": bucket_props,
@@ -230,6 +244,8 @@ class PrivateS3HostingProps:
230
244
  self._values["enable_private_dns"] = enable_private_dns
231
245
  if internet_facing is not None:
232
246
  self._values["internet_facing"] = internet_facing
247
+ if sub_domain is not None:
248
+ self._values["sub_domain"] = sub_domain
233
249
  if vpc is not None:
234
250
  self._values["vpc"] = vpc
235
251
 
@@ -247,7 +263,13 @@ class PrivateS3HostingProps:
247
263
  def domain_name(self) -> builtins.str:
248
264
  '''The domain name for the website.
249
265
 
250
- This will be used to create the S3 bucket and the ALB listener
266
+ S3 bucket name will be created with ``domainName``.
267
+
268
+ If ``enablePrivateDns`` is enabled,
269
+ a private hosted zone also will be created for the ``domainName``
270
+ and an A record has been created from ``domainName`` to the ALB DNS name.".
271
+
272
+ If ``subDomein`` is provided, these names will be ``${subDomain}.${domainName}``.
251
273
  '''
252
274
  result = self._values.get("domain_name")
253
275
  assert result is not None, "Required property 'domain_name' is missing"
@@ -287,6 +309,21 @@ class PrivateS3HostingProps:
287
309
  result = self._values.get("internet_facing")
288
310
  return typing.cast(typing.Optional[builtins.bool], result)
289
311
 
312
+ @builtins.property
313
+ def sub_domain(self) -> typing.Optional[builtins.str]:
314
+ '''The sub domain for the website.
315
+
316
+ S3 bucket name will be created with ``${subDomain}.{domainName}``.
317
+
318
+ If ``enablePrivateDns`` is enabled,
319
+ a private hosted zone also will be created for the ``domainName``
320
+ and an A record has been created from ``${subDomain}.${domainName}`` to the ALB DNS name.".
321
+
322
+ :default: - no sub domain
323
+ '''
324
+ result = self._values.get("sub_domain")
325
+ return typing.cast(typing.Optional[builtins.str], result)
326
+
290
327
  @builtins.property
291
328
  def vpc(self) -> typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc]:
292
329
  '''The VPC for the website.
@@ -324,6 +361,7 @@ def _typecheckingstub__1f6a3822c2541f3c785fce5f3187d688039409f4677b681948fb4a3ae
324
361
  certificate: typing.Optional[_aws_cdk_aws_certificatemanager_ceddda9d.ICertificate] = None,
325
362
  enable_private_dns: typing.Optional[builtins.bool] = None,
326
363
  internet_facing: typing.Optional[builtins.bool] = None,
364
+ sub_domain: typing.Optional[builtins.str] = None,
327
365
  vpc: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc] = None,
328
366
  ) -> None:
329
367
  """Type checking stubs"""
@@ -336,6 +374,7 @@ def _typecheckingstub__5f3ff047cbd8e8c18995347a63899f04375c4e4a279cffb2f203e5b10
336
374
  certificate: typing.Optional[_aws_cdk_aws_certificatemanager_ceddda9d.ICertificate] = None,
337
375
  enable_private_dns: typing.Optional[builtins.bool] = None,
338
376
  internet_facing: typing.Optional[builtins.bool] = None,
377
+ sub_domain: typing.Optional[builtins.str] = None,
339
378
  vpc: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc] = None,
340
379
  ) -> None:
341
380
  """Type checking stubs"""
@@ -33,9 +33,9 @@ import constructs._jsii
33
33
 
34
34
  __jsii_assembly__ = jsii.JSIIAssembly.load(
35
35
  "cdk-private-s3-hosting",
36
- "0.0.1",
36
+ "0.0.2",
37
37
  __name__[0:-6],
38
- "cdk-private-s3-hosting@0.0.1.jsii.tgz",
38
+ "cdk-private-s3-hosting@0.0.2.jsii.tgz",
39
39
  )
40
40
 
41
41
  __all__ = [
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cdk-private-s3-hosting
3
- Version: 0.0.1
3
+ Version: 0.0.2
4
4
  Summary: CDK Construct for a private frontend hosting S3 bucket
5
5
  Home-page: https://github.com/badmintoncryer/cdk-private-s3-hosting.git
6
6
  Author: Kazuho CryerShinozuka<malaysia.cryer@gmail.com>
@@ -0,0 +1,9 @@
1
+ cdk-private-s3-hosting/__init__.py,sha256=mQsZ-xyYmP7nweN9vIH6fotdCzRkfvY9h3v2KxmjGSo,18130
2
+ cdk-private-s3-hosting/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
3
+ cdk-private-s3-hosting/_jsii/__init__.py,sha256=6256oRzj6EVzyss4i-lfQxMgs-3l3loSpRraDPXMYYU,1468
4
+ cdk-private-s3-hosting/_jsii/cdk-private-s3-hosting@0.0.2.jsii.tgz,sha256=1oaAusIUmVvdjG6hxongv0sbxTu0RNOM_em7CzP15JQ,44766
5
+ cdk_private_s3_hosting-0.0.2.dist-info/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
6
+ cdk_private_s3_hosting-0.0.2.dist-info/METADATA,sha256=sC2FPtVEUqR8LXnI48XAQSVIYiDPocQ1A0SlhwnmKYM,4484
7
+ cdk_private_s3_hosting-0.0.2.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
8
+ cdk_private_s3_hosting-0.0.2.dist-info/top_level.txt,sha256=Garilimgavjx7-oTth2AD47uG-twwl6dTXCfLYQ1lqY,23
9
+ cdk_private_s3_hosting-0.0.2.dist-info/RECORD,,
@@ -1,9 +0,0 @@
1
- cdk-private-s3-hosting/__init__.py,sha256=svf2FjYMSKoD5c5R54-BGUd8YJ9kzDtQ1hK2kqIk-E8,15206
2
- cdk-private-s3-hosting/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
3
- cdk-private-s3-hosting/_jsii/__init__.py,sha256=x5XwJ2T00WRPX6GwqnScZPG_0LTtkA2IGi3GFUzPXf0,1468
4
- cdk-private-s3-hosting/_jsii/cdk-private-s3-hosting@0.0.1.jsii.tgz,sha256=JdE8rvaS9Bcc08erv09sR7Qht8HOufExHdwrcuAdzdo,43664
5
- cdk_private_s3_hosting-0.0.1.dist-info/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
6
- cdk_private_s3_hosting-0.0.1.dist-info/METADATA,sha256=DYRj3pyXfrwP9U2z025BpxLIq4vL6j8cUEPZxv3Rojw,4484
7
- cdk_private_s3_hosting-0.0.1.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
8
- cdk_private_s3_hosting-0.0.1.dist-info/top_level.txt,sha256=Garilimgavjx7-oTth2AD47uG-twwl6dTXCfLYQ1lqY,23
9
- cdk_private_s3_hosting-0.0.1.dist-info/RECORD,,