@@ -348,6 +348,7 @@ def create_gateway_action(self,
348
348
id : str ,
349
349
action : str ,
350
350
* ,
351
+ authentication_key : 'GatewayActionTemplateAuthenticationKey' = None ,
351
352
global_ : bool = None ,
352
353
metered : bool = None ,
353
354
resource_group : 'ResourceGroupIdentity' = None ,
@@ -363,6 +364,12 @@ def create_gateway_action(self,
363
364
364
365
:param str id: Direct Link Connect gateway identifier.
365
366
:param str action: Action request.
367
+ :param GatewayActionTemplateAuthenticationKey authentication_key:
368
+ (optional) BGP MD5 authentication key.
369
+ BGP MD5 keys must be type=standard.
370
+ The key material that you provide must be base64 encoded and original
371
+ string must be maximum 126 ASCII characters in length.
372
+ To clear the optional `authentication_key` field patch its crn to `""`.
366
373
:param bool global_: (optional) Required for create_gateway_approve
367
374
requests to select the gateway's routing option. Gateways with global
368
375
routing (`true`) can connect to networks outside of their associated
@@ -389,6 +396,8 @@ def create_gateway_action(self,
389
396
raise ValueError ('id must be provided' )
390
397
if action is None :
391
398
raise ValueError ('action must be provided' )
399
+ if authentication_key is not None :
400
+ authentication_key = convert_model (authentication_key )
392
401
if resource_group is not None :
393
402
resource_group = convert_model (resource_group )
394
403
headers = {}
@@ -403,6 +412,7 @@ def create_gateway_action(self,
403
412
404
413
data = {
405
414
'action' : action ,
415
+ 'authentication_key' : authentication_key ,
406
416
'global' : global_ ,
407
417
'metered' : metered ,
408
418
'resource_group' : resource_group ,
@@ -1242,6 +1252,12 @@ class Gateway():
1242
1252
"""
1243
1253
gateway.
1244
1254
1255
+ :attr GatewayAuthenticationKey authentication_key: (optional) BGP MD5
1256
+ authentication key.
1257
+ BGP MD5 keys must be type=standard.
1258
+ The key material that you provide must be base64 encoded and original string
1259
+ must be maximum 126 ASCII characters in length.
1260
+ To clear the optional `authentication_key` field patch its crn to `""`.
1245
1261
:attr int bgp_asn: Customer BGP ASN.
1246
1262
:attr str bgp_base_cidr: (optional) (DEPRECATED) BGP base CIDR is deprecated and
1247
1263
no longer recognized by the Direct Link APIs.
@@ -1292,7 +1308,7 @@ class Gateway():
1292
1308
:attr ResourceGroupReference resource_group: (optional) Resource group
1293
1309
reference.
1294
1310
:attr int speed_mbps: Gateway speed in megabits per second.
1295
- :attr str type: Gateway type. The list of enumerated values for this property
1311
+ :attr str type: Offering type. The list of enumerated values for this property
1296
1312
may expand in the future. Code and processes using this field must tolerate
1297
1313
unexpected values.
1298
1314
:attr int vlan: (optional) VLAN allocated for this gateway. Only set for
@@ -1313,6 +1329,7 @@ def __init__(self,
1313
1329
speed_mbps : int ,
1314
1330
type : str ,
1315
1331
* ,
1332
+ authentication_key : 'GatewayAuthenticationKey' = None ,
1316
1333
bgp_base_cidr : str = None ,
1317
1334
bgp_cer_cidr : str = None ,
1318
1335
bgp_ibm_asn : int = None ,
@@ -1348,9 +1365,15 @@ def __init__(self,
1348
1365
enumerated values for this property may expand in the future. Code and
1349
1366
processes using this field must tolerate unexpected values.
1350
1367
:param int speed_mbps: Gateway speed in megabits per second.
1351
- :param str type: Gateway type. The list of enumerated values for this
1368
+ :param str type: Offering type. The list of enumerated values for this
1352
1369
property may expand in the future. Code and processes using this field
1353
1370
must tolerate unexpected values.
1371
+ :param GatewayAuthenticationKey authentication_key: (optional) BGP MD5
1372
+ authentication key.
1373
+ BGP MD5 keys must be type=standard.
1374
+ The key material that you provide must be base64 encoded and original
1375
+ string must be maximum 126 ASCII characters in length.
1376
+ To clear the optional `authentication_key` field patch its crn to `""`.
1354
1377
:param str bgp_base_cidr: (optional) (DEPRECATED) BGP base CIDR is
1355
1378
deprecated and no longer recognized by the Direct Link APIs.
1356
1379
See bgp_cer_cidr and bgp_ibm_cidr fields instead for IP related
@@ -1389,6 +1412,7 @@ def __init__(self,
1389
1412
:param int vlan: (optional) VLAN allocated for this gateway. Only set for
1390
1413
type=connect gateways.
1391
1414
"""
1415
+ self .authentication_key = authentication_key
1392
1416
self .bgp_asn = bgp_asn
1393
1417
self .bgp_base_cidr = bgp_base_cidr
1394
1418
self .bgp_cer_cidr = bgp_cer_cidr
@@ -1422,6 +1446,8 @@ def __init__(self,
1422
1446
def from_dict (cls , _dict : Dict ) -> 'Gateway' :
1423
1447
"""Initialize a Gateway object from a json dictionary."""
1424
1448
args = {}
1449
+ if 'authentication_key' in _dict :
1450
+ args ['authentication_key' ] = GatewayAuthenticationKey .from_dict (_dict .get ('authentication_key' ))
1425
1451
if 'bgp_asn' in _dict :
1426
1452
args ['bgp_asn' ] = _dict .get ('bgp_asn' )
1427
1453
else :
@@ -1512,6 +1538,8 @@ def _from_dict(cls, _dict):
1512
1538
def to_dict (self ) -> Dict :
1513
1539
"""Return a json dictionary representing this model."""
1514
1540
_dict = {}
1541
+ if hasattr (self , 'authentication_key' ) and self .authentication_key is not None :
1542
+ _dict ['authentication_key' ] = self .authentication_key .to_dict ()
1515
1543
if hasattr (self , 'bgp_asn' ) and self .bgp_asn is not None :
1516
1544
_dict ['bgp_asn' ] = self .bgp_asn
1517
1545
if hasattr (self , 'bgp_base_cidr' ) and self .bgp_base_cidr is not None :
@@ -1632,13 +1660,133 @@ class OperationalStatusEnum(Enum):
1632
1660
1633
1661
class TypeEnum (Enum ):
1634
1662
"""
1635
- Gateway type. The list of enumerated values for this property may expand in the
1663
+ Offering type. The list of enumerated values for this property may expand in the
1636
1664
future. Code and processes using this field must tolerate unexpected values.
1637
1665
"""
1638
1666
CONNECT = "connect"
1639
1667
DEDICATED = "dedicated"
1640
1668
1641
1669
1670
+ class GatewayActionTemplateAuthenticationKey ():
1671
+ """
1672
+ BGP MD5 authentication key.
1673
+ BGP MD5 keys must be type=standard.
1674
+ The key material that you provide must be base64 encoded and original string must be
1675
+ maximum 126 ASCII characters in length.
1676
+ To clear the optional `authentication_key` field patch its crn to `""`.
1677
+
1678
+ :attr str crn: connectivity association key crn.
1679
+ """
1680
+
1681
+ def __init__ (self ,
1682
+ crn : str ) -> None :
1683
+ """
1684
+ Initialize a GatewayActionTemplateAuthenticationKey object.
1685
+
1686
+ :param str crn: connectivity association key crn.
1687
+ """
1688
+ self .crn = crn
1689
+
1690
+ @classmethod
1691
+ def from_dict (cls , _dict : Dict ) -> 'GatewayActionTemplateAuthenticationKey' :
1692
+ """Initialize a GatewayActionTemplateAuthenticationKey object from a json dictionary."""
1693
+ args = {}
1694
+ if 'crn' in _dict :
1695
+ args ['crn' ] = _dict .get ('crn' )
1696
+ else :
1697
+ raise ValueError ('Required property \' crn\' not present in GatewayActionTemplateAuthenticationKey JSON' )
1698
+ return cls (** args )
1699
+
1700
+ @classmethod
1701
+ def _from_dict (cls , _dict ):
1702
+ """Initialize a GatewayActionTemplateAuthenticationKey object from a json dictionary."""
1703
+ return cls .from_dict (_dict )
1704
+
1705
+ def to_dict (self ) -> Dict :
1706
+ """Return a json dictionary representing this model."""
1707
+ _dict = {}
1708
+ if hasattr (self , 'crn' ) and self .crn is not None :
1709
+ _dict ['crn' ] = self .crn
1710
+ return _dict
1711
+
1712
+ def _to_dict (self ):
1713
+ """Return a json dictionary representing this model."""
1714
+ return self .to_dict ()
1715
+
1716
+ def __str__ (self ) -> str :
1717
+ """Return a `str` version of this GatewayActionTemplateAuthenticationKey object."""
1718
+ return json .dumps (self .to_dict (), indent = 2 )
1719
+
1720
+ def __eq__ (self , other : 'GatewayActionTemplateAuthenticationKey' ) -> bool :
1721
+ """Return `true` when self and other are equal, false otherwise."""
1722
+ if not isinstance (other , self .__class__ ):
1723
+ return False
1724
+ return self .__dict__ == other .__dict__
1725
+
1726
+ def __ne__ (self , other : 'GatewayActionTemplateAuthenticationKey' ) -> bool :
1727
+ """Return `true` when self and other are not equal, false otherwise."""
1728
+ return not self == other
1729
+
1730
+ class GatewayAuthenticationKey ():
1731
+ """
1732
+ BGP MD5 authentication key.
1733
+ BGP MD5 keys must be type=standard.
1734
+ The key material that you provide must be base64 encoded and original string must be
1735
+ maximum 126 ASCII characters in length.
1736
+ To clear the optional `authentication_key` field patch its crn to `""`.
1737
+
1738
+ :attr str crn: connectivity association key crn.
1739
+ """
1740
+
1741
+ def __init__ (self ,
1742
+ crn : str ) -> None :
1743
+ """
1744
+ Initialize a GatewayAuthenticationKey object.
1745
+
1746
+ :param str crn: connectivity association key crn.
1747
+ """
1748
+ self .crn = crn
1749
+
1750
+ @classmethod
1751
+ def from_dict (cls , _dict : Dict ) -> 'GatewayAuthenticationKey' :
1752
+ """Initialize a GatewayAuthenticationKey object from a json dictionary."""
1753
+ args = {}
1754
+ if 'crn' in _dict :
1755
+ args ['crn' ] = _dict .get ('crn' )
1756
+ else :
1757
+ raise ValueError ('Required property \' crn\' not present in GatewayAuthenticationKey JSON' )
1758
+ return cls (** args )
1759
+
1760
+ @classmethod
1761
+ def _from_dict (cls , _dict ):
1762
+ """Initialize a GatewayAuthenticationKey object from a json dictionary."""
1763
+ return cls .from_dict (_dict )
1764
+
1765
+ def to_dict (self ) -> Dict :
1766
+ """Return a json dictionary representing this model."""
1767
+ _dict = {}
1768
+ if hasattr (self , 'crn' ) and self .crn is not None :
1769
+ _dict ['crn' ] = self .crn
1770
+ return _dict
1771
+
1772
+ def _to_dict (self ):
1773
+ """Return a json dictionary representing this model."""
1774
+ return self .to_dict ()
1775
+
1776
+ def __str__ (self ) -> str :
1777
+ """Return a `str` version of this GatewayAuthenticationKey object."""
1778
+ return json .dumps (self .to_dict (), indent = 2 )
1779
+
1780
+ def __eq__ (self , other : 'GatewayAuthenticationKey' ) -> bool :
1781
+ """Return `true` when self and other are equal, false otherwise."""
1782
+ if not isinstance (other , self .__class__ ):
1783
+ return False
1784
+ return self .__dict__ == other .__dict__
1785
+
1786
+ def __ne__ (self , other : 'GatewayAuthenticationKey' ) -> bool :
1787
+ """Return `true` when self and other are not equal, false otherwise."""
1788
+ return not self == other
1789
+
1642
1790
class GatewayChangeRequest ():
1643
1791
"""
1644
1792
GatewayChangeRequest.
@@ -2861,7 +3009,7 @@ class GatewayTemplate():
2861
3009
resource. If unspecified, the account's [default resource
2862
3010
group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used.
2863
3011
:attr int speed_mbps: Gateway speed in megabits per second.
2864
- :attr str type: Gateway type.
3012
+ :attr str type: Offering type.
2865
3013
"""
2866
3014
2867
3015
def __init__ (self ,
@@ -2887,7 +3035,7 @@ def __init__(self,
2887
3035
instead a flat rate is charged for the gateway.
2888
3036
:param str name: The unique user-defined name for this gateway.
2889
3037
:param int speed_mbps: Gateway speed in megabits per second.
2890
- :param str type: Gateway type.
3038
+ :param str type: Offering type.
2891
3039
:param str bgp_base_cidr: (optional) (DEPRECATED) BGP base CIDR.
2892
3040
Field is deprecated. See bgp_ibm_cidr and bgp_cer_cidr for details on how
2893
3041
to create a gateway using either automatic or explicit IP assignment. Any
@@ -2919,7 +3067,7 @@ def __init__(self,
2919
3067
2920
3068
class TypeEnum (Enum ):
2921
3069
"""
2922
- Gateway type.
3070
+ Offering type.
2923
3071
"""
2924
3072
CONNECT = "connect"
2925
3073
DEDICATED = "dedicated"
@@ -4254,7 +4402,7 @@ class GatewayTemplateGatewayTypeConnectTemplate(GatewayTemplate):
4254
4402
resource. If unspecified, the account's [default resource
4255
4403
group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used.
4256
4404
:attr int speed_mbps: Gateway speed in megabits per second.
4257
- :attr str type: Gateway type.
4405
+ :attr str type: Offering type.
4258
4406
:attr GatewayPortIdentity port: Select Port Label for new type=connect gateway.
4259
4407
"""
4260
4408
@@ -4282,7 +4430,7 @@ def __init__(self,
4282
4430
instead a flat rate is charged for the gateway.
4283
4431
:param str name: The unique user-defined name for this gateway.
4284
4432
:param int speed_mbps: Gateway speed in megabits per second.
4285
- :param str type: Gateway type.
4433
+ :param str type: Offering type.
4286
4434
:param GatewayPortIdentity port: Select Port Label for new type=connect
4287
4435
gateway.
4288
4436
:param str bgp_base_cidr: (optional) (DEPRECATED) BGP base CIDR.
@@ -4417,7 +4565,7 @@ def __ne__(self, other: 'GatewayTemplateGatewayTypeConnectTemplate') -> bool:
4417
4565
4418
4566
class TypeEnum (Enum ):
4419
4567
"""
4420
- Gateway type.
4568
+ Offering type.
4421
4569
"""
4422
4570
CONNECT = "connect"
4423
4571
DEDICATED = "dedicated"
@@ -4458,7 +4606,7 @@ class GatewayTemplateGatewayTypeDedicatedTemplate(GatewayTemplate):
4458
4606
resource. If unspecified, the account's [default resource
4459
4607
group](https://cloud.ibm.com/apidocs/resource-manager#introduction) is used.
4460
4608
:attr int speed_mbps: Gateway speed in megabits per second.
4461
- :attr str type: Gateway type.
4609
+ :attr str type: Offering type.
4462
4610
:attr str carrier_name: Carrier name.
4463
4611
:attr str cross_connect_router: Cross connect router.
4464
4612
:attr str customer_name: Customer name.
@@ -4495,7 +4643,7 @@ def __init__(self,
4495
4643
instead a flat rate is charged for the gateway.
4496
4644
:param str name: The unique user-defined name for this gateway.
4497
4645
:param int speed_mbps: Gateway speed in megabits per second.
4498
- :param str type: Gateway type.
4646
+ :param str type: Offering type.
4499
4647
:param str carrier_name: Carrier name.
4500
4648
:param str cross_connect_router: Cross connect router.
4501
4649
:param str customer_name: Customer name.
@@ -4660,7 +4808,7 @@ def __ne__(self, other: 'GatewayTemplateGatewayTypeDedicatedTemplate') -> bool:
4660
4808
4661
4809
class TypeEnum (Enum ):
4662
4810
"""
4663
- Gateway type.
4811
+ Offering type.
4664
4812
"""
4665
4813
CONNECT = "connect"
4666
4814
DEDICATED = "dedicated"
0 commit comments