Sha256: 1b7a65c2c688476fc30a576a7ed5bd4409dc6a1601ba87308f3f6cf4c6112cf9

Contents?: true

Size: 610 Bytes

Versions: 1

Compression:

Stored size: 610 Bytes

Contents

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::RolesAPI.new
role_id = "role_id_example" # String | The ID of the role.
body = DatadogAPIClient::V2::RoleCloneRequest.new({ data: DatadogAPIClient::V2::RoleClone.new({ attributes: DatadogAPIClient::V2::RoleCloneAttributes.new({ name: "cloned-role" }), type: DatadogAPIClient::V2::RolesType::ROLES }) }) # RoleCloneRequest |

begin
  # Create a new role by cloning an existing role
  result = api_instance.clone_role(role_id, body)
  p result
rescue DatadogAPIClient::V2::APIError => e
  puts "Error when calling RolesAPI->clone_role: #{e}"
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
datadog_api_client-1.7.0 examples/generated/v2/roles/CloneRole.rb