examples/v2/roles/CreateRole.rb in datadog_api_client-2.22.0 vs examples/v2/roles/CreateRole.rb in datadog_api_client-2.24.0

- old
+ new

@@ -3,12 +3,24 @@ require "datadog_api_client" api_instance = DatadogAPIClient::V2::RolesAPI.new body = DatadogAPIClient::V2::RoleCreateRequest.new({ data: DatadogAPIClient::V2::RoleCreateData.new({ - type: DatadogAPIClient::V2::RolesType::ROLES, attributes: DatadogAPIClient::V2::RoleCreateAttributes.new({ - name: "Example-Role", + name: "developers", }), + relationships: DatadogAPIClient::V2::RoleRelationships.new({ + permissions: DatadogAPIClient::V2::RelationshipToPermissions.new({ + data: [ + DatadogAPIClient::V2::RelationshipToPermissionData.new({ + type: DatadogAPIClient::V2::PermissionsType::PERMISSIONS, + }), + ], + }), + users: DatadogAPIClient::V2::RelationshipToUsers.new({ + data: [], + }), + }), + type: DatadogAPIClient::V2::RolesType::ROLES, }), }) p api_instance.create_role(body)