Skip to content

Commit 2bd5a05

Browse files
TKIPisalegacycipherGitHub Action
andauthored
Automatically regenerated library to version 2.0.0 for API version 1.57.0. (#289)
Co-authored-by: GitHub Action <support@meraki.com>
1 parent 7dfe611 commit 2bd5a05

23 files changed

+395
-123
lines changed

meraki/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@
4343
)
4444
from meraki.rest_session import *
4545

46-
__version__ = '1.56.0'
47-
__api_version__ = '1.56.0'
46+
__version__ = '2.0.0'
47+
__api_version__ = '1.57.0'
4848

4949

5050
class DashboardAPI(object):

meraki/aio/api/appliance.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2474,10 +2474,10 @@ def getOrganizationApplianceDnsLocalProfilesAssignments(self, organizationId: st
24742474

24752475

24762476

2477-
def createOrganizationApplianceDnsLocalProfilesAssignmentsBulkCreate(self, organizationId: str, items: list):
2477+
def bulkOrganizationApplianceDnsLocalProfilesAssignmentsCreate(self, organizationId: str, items: list):
24782478
"""
24792479
**Assign the local DNS profile to networks in the organization**
2480-
https://developer.cisco.com/meraki/api-v1/#!create-organization-appliance-dns-local-profiles-assignments-bulk-create
2480+
https://developer.cisco.com/meraki/api-v1/#!bulk-organization-appliance-dns-local-profiles-assignments-create
24812481
24822482
- organizationId (string): Organization ID
24832483
- items (array): List containing the network ID and Profile ID
@@ -2486,8 +2486,8 @@ def createOrganizationApplianceDnsLocalProfilesAssignmentsBulkCreate(self, organ
24862486
kwargs = locals()
24872487

24882488
metadata = {
2489-
'tags': ['appliance', 'configure', 'dns', 'local', 'profiles', 'assignments', 'bulkCreate'],
2490-
'operation': 'createOrganizationApplianceDnsLocalProfilesAssignmentsBulkCreate'
2489+
'tags': ['appliance', 'configure', 'dns', 'local', 'profiles', 'assignments'],
2490+
'operation': 'bulkOrganizationApplianceDnsLocalProfilesAssignmentsCreate'
24912491
}
24922492
organizationId = urllib.parse.quote(str(organizationId), safe='')
24932493
resource = f'/organizations/{organizationId}/appliance/dns/local/profiles/assignments/bulkCreate'

meraki/aio/api/licensing.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ def getAdministeredLicensingSubscriptionSubscriptions(self, organizationIds: lis
5353
- endDate (string): Filter subscriptions by end date, ISO 8601 format. To filter with a range of dates, use 'endDate[<option>]=?' in the request. Accepted options include lt, gt, lte, gte.
5454
- statuses (array): List of statuses that returned subscriptions can have
5555
- productTypes (array): List of product types that returned subscriptions need to have entitlements for.
56+
- skus (array): List of SKUs that returned subscriptions need to have entitlements for.
5657
- name (string): Search for subscription name
5758
"""
5859

@@ -64,10 +65,10 @@ def getAdministeredLicensingSubscriptionSubscriptions(self, organizationIds: lis
6465
}
6566
resource = f'/administered/licensing/subscription/subscriptions'
6667

67-
query_params = ['perPage', 'startingAfter', 'endingBefore', 'subscriptionIds', 'organizationIds', 'startDate', 'endDate', 'statuses', 'productTypes', 'name', ]
68+
query_params = ['perPage', 'startingAfter', 'endingBefore', 'subscriptionIds', 'organizationIds', 'startDate', 'endDate', 'statuses', 'productTypes', 'skus', 'name', ]
6869
params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params}
6970

70-
array_params = ['subscriptionIds', 'organizationIds', 'statuses', 'productTypes', ]
71+
array_params = ['subscriptionIds', 'organizationIds', 'statuses', 'productTypes', 'skus', ]
7172
for k, v in kwargs.items():
7273
if k.strip() in array_params:
7374
params[f'{k.strip()}[]'] = kwargs[f'{k}']

meraki/aio/api/networks.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1183,7 +1183,7 @@ def createNetworkFloorPlan(self, networkId: str, name: str, imageContents: str,
11831183
- bottomRightCorner (object): The longitude and latitude of the bottom right corner of your floor plan.
11841184
- topLeftCorner (object): The longitude and latitude of the top left corner of your floor plan.
11851185
- topRightCorner (object): The longitude and latitude of the top right corner of your floor plan.
1186-
- floorNumber (integer): The floor number of the floors within the building
1186+
- floorNumber (number): The floor number of the floors within the building
11871187
"""
11881188

11891189
kwargs.update(locals())
@@ -1361,7 +1361,7 @@ def updateNetworkFloorPlan(self, networkId: str, floorPlanId: str, **kwargs):
13611361
- bottomRightCorner (object): The longitude and latitude of the bottom right corner of your floor plan.
13621362
- topLeftCorner (object): The longitude and latitude of the top left corner of your floor plan.
13631363
- topRightCorner (object): The longitude and latitude of the top right corner of your floor plan.
1364-
- floorNumber (integer): The floor number of the floors within the building
1364+
- floorNumber (number): The floor number of the floors within the building
13651365
- imageContents (string): The file contents (a base 64 encoded string) of your new image. Supported formats are PNG, GIF, and JPG. Note that all images are saved as PNG files, regardless of the format they are uploaded in. If you upload a new image, and you do NOT specify any new geolocation fields ('center, 'topLeftCorner', etc), the floor plan will be recentered with no rotation in order to maintain the aspect ratio of your new image.
13661366
"""
13671367

meraki/aio/api/organizations.py

Lines changed: 89 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2688,6 +2688,92 @@ def getOrganizationFloorPlansAutoLocateStatuses(self, organizationId: str, total
26882688

26892689

26902690

2691+
def getOrganizationIntegrationsXdrNetworks(self, organizationId: str, total_pages=1, direction='next', **kwargs):
2692+
"""
2693+
**Returns the networks in the organization that have XDR enabled**
2694+
https://developer.cisco.com/meraki/api-v1/#!get-organization-integrations-xdr-networks
2695+
2696+
- organizationId (string): Organization ID
2697+
- total_pages (integer or string): use with perPage to get total results up to total_pages*perPage; -1 or "all" for all pages
2698+
- direction (string): direction to paginate, either "next" (default) or "prev" page
2699+
- networkIds (array): Optional parameter to filter the results by network IDs
2700+
- perPage (integer): The number of entries per page returned. Acceptable range is 3 - 100. Default is 20.
2701+
- startingAfter (string): A token used by the server to indicate the start of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it.
2702+
- endingBefore (string): A token used by the server to indicate the end of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it.
2703+
"""
2704+
2705+
kwargs.update(locals())
2706+
2707+
metadata = {
2708+
'tags': ['organizations', 'configure', 'integrations', 'xdr', 'networks'],
2709+
'operation': 'getOrganizationIntegrationsXdrNetworks'
2710+
}
2711+
organizationId = urllib.parse.quote(str(organizationId), safe='')
2712+
resource = f'/organizations/{organizationId}/integrations/xdr/networks'
2713+
2714+
query_params = ['networkIds', 'perPage', 'startingAfter', 'endingBefore', ]
2715+
params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params}
2716+
2717+
array_params = ['networkIds', ]
2718+
for k, v in kwargs.items():
2719+
if k.strip() in array_params:
2720+
params[f'{k.strip()}[]'] = kwargs[f'{k}']
2721+
params.pop(k.strip())
2722+
2723+
return self._session.get_pages(metadata, resource, params, total_pages, direction)
2724+
2725+
2726+
2727+
def disableOrganizationIntegrationsXdrNetworks(self, organizationId: str, networks: list):
2728+
"""
2729+
**Disable XDR on networks**
2730+
https://developer.cisco.com/meraki/api-v1/#!disable-organization-integrations-xdr-networks
2731+
2732+
- organizationId (string): Organization ID
2733+
- networks (array): List containing the network ID and the product type to disable XDR on
2734+
"""
2735+
2736+
kwargs = locals()
2737+
2738+
metadata = {
2739+
'tags': ['organizations', 'configure', 'integrations', 'xdr', 'networks'],
2740+
'operation': 'disableOrganizationIntegrationsXdrNetworks'
2741+
}
2742+
organizationId = urllib.parse.quote(str(organizationId), safe='')
2743+
resource = f'/organizations/{organizationId}/integrations/xdr/networks/disable'
2744+
2745+
body_params = ['networks', ]
2746+
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}
2747+
2748+
return self._session.post(metadata, resource, payload)
2749+
2750+
2751+
2752+
def enableOrganizationIntegrationsXdrNetworks(self, organizationId: str, networks: list):
2753+
"""
2754+
**Enable XDR on networks**
2755+
https://developer.cisco.com/meraki/api-v1/#!enable-organization-integrations-xdr-networks
2756+
2757+
- organizationId (string): Organization ID
2758+
- networks (array): List containing the network ID and the product type to enable XDR on
2759+
"""
2760+
2761+
kwargs = locals()
2762+
2763+
metadata = {
2764+
'tags': ['organizations', 'configure', 'integrations', 'xdr', 'networks'],
2765+
'operation': 'enableOrganizationIntegrationsXdrNetworks'
2766+
}
2767+
organizationId = urllib.parse.quote(str(organizationId), safe='')
2768+
resource = f'/organizations/{organizationId}/integrations/xdr/networks/enable'
2769+
2770+
body_params = ['networks', ]
2771+
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}
2772+
2773+
return self._session.post(metadata, resource, payload)
2774+
2775+
2776+
26912777
def claimIntoOrganizationInventory(self, organizationId: str, **kwargs):
26922778
"""
26932779
**Claim a list of devices, licenses, and/or orders into an organization inventory**
@@ -3242,7 +3328,8 @@ def updateOrganizationLoginSecurity(self, organizationId: str, **kwargs):
32423328
- passwordExpirationDays (integer): Number of days after which users will be forced to change their password.
32433329
- enforceDifferentPasswords (boolean): Boolean indicating whether users, when setting a new password, are forced to choose a new password that is different from any past passwords.
32443330
- numDifferentPasswords (integer): Number of recent passwords that new password must be distinct from.
3245-
- enforceStrongPasswords (boolean): Boolean indicating whether users will be forced to choose strong passwords for their accounts. Strong passwords are at least 8 characters that contain 3 of the following: number, uppercase letter, lowercase letter, and symbol
3331+
- enforceStrongPasswords (boolean): Deprecated. Values of 'false' are always ignored.
3332+
- minimumPasswordLength (integer): Minimum number of characters required in admins' passwords.
32463333
- enforceAccountLockout (boolean): Boolean indicating whether users' Dashboard accounts will be locked out after a specified number of consecutive failed login attempts.
32473334
- accountLockoutAttempts (integer): Number of consecutive failed login attempts after which users' accounts will be locked.
32483335
- enforceIdleTimeout (boolean): Boolean indicating whether users will be logged out after being idle for the specified number of minutes.
@@ -3262,7 +3349,7 @@ def updateOrganizationLoginSecurity(self, organizationId: str, **kwargs):
32623349
organizationId = urllib.parse.quote(str(organizationId), safe='')
32633350
resource = f'/organizations/{organizationId}/loginSecurity'
32643351

3265-
body_params = ['enforcePasswordExpiration', 'passwordExpirationDays', 'enforceDifferentPasswords', 'numDifferentPasswords', 'enforceStrongPasswords', 'enforceAccountLockout', 'accountLockoutAttempts', 'enforceIdleTimeout', 'idleTimeoutMinutes', 'enforceTwoFactorAuth', 'enforceLoginIpRanges', 'loginIpRanges', 'apiAuthentication', ]
3352+
body_params = ['enforcePasswordExpiration', 'passwordExpirationDays', 'enforceDifferentPasswords', 'numDifferentPasswords', 'enforceStrongPasswords', 'minimumPasswordLength', 'enforceAccountLockout', 'accountLockoutAttempts', 'enforceIdleTimeout', 'idleTimeoutMinutes', 'enforceTwoFactorAuth', 'enforceLoginIpRanges', 'loginIpRanges', 'apiAuthentication', ]
32663353
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}
32673354

32683355
return self._session.put(metadata, resource, payload)

meraki/aio/api/sensor.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@ def createDeviceSensorCommand(self, serial: str, operation: str):
6363

6464
kwargs = locals()
6565

66+
if 'operation' in kwargs:
67+
options = ['cycleDownstreamPower', 'disableDownstreamPower', 'enableDownstreamPower', 'refreshData']
68+
assert kwargs['operation'] in options, f'''"operation" cannot be "{kwargs['operation']}", & must be set to one of: {options}'''
69+
6670
metadata = {
6771
'tags': ['sensor', 'configure', 'commands'],
6872
'operation': 'createDeviceSensorCommand'

0 commit comments

Comments
 (0)