Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ that is being resurrected.
private static Option<double?> MaxTotalChargeUsd { get; } = new(
name: @"--max-total-charge-usd")
{
Description = @"Specifies the maximum cost of the run. This parameter is
useful for pay-per-event Actors, as it allows you to limit the amount
charged to your subscription. You can access the maximum cost in your Actor
Description = @"Specifies the maximum total cost of the run.
Use it to cap the total amount charged for all pricing models.
You can access the maximum cost in your Actor
by using the `ACTOR_MAX_TOTAL_CHARGE_USD` environment variable.
",
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,16 @@ internal static partial class ActorTasksActorTaskRunSyncGetCommandApiCommand
",
};

private static Option<double?> MaxTotalChargeUsd { get; } = new(
name: @"--max-total-charge-usd")
{
Description = @"Specifies the maximum total cost of the run.
Use it to cap the total amount charged for all pricing models.
You can access the maximum cost in your Actor
by using the `ACTOR_MAX_TOTAL_CHARGE_USD` environment variable.
",
};

private static Option<string?> Build { get; } = new(
name: @"--build")
{
Expand Down Expand Up @@ -117,6 +127,7 @@ endpoint instead.
command.Options.Add(Timeout);
command.Options.Add(Memory);
command.Options.Add(MaxItems);
command.Options.Add(MaxTotalChargeUsd);
command.Options.Add(Build);
command.Options.Add(OutputRecordKey);
command.Options.Add(Webhooks);
Expand All @@ -129,6 +140,7 @@ await CliRuntime.RunAsync(async () =>
var timeout = parseResult.GetValue(Timeout);
var memory = parseResult.GetValue(Memory);
var maxItems = parseResult.GetValue(MaxItems);
var maxTotalChargeUsd = parseResult.GetValue(MaxTotalChargeUsd);
var build = parseResult.GetValue(Build);
var outputRecordKey = parseResult.GetValue(OutputRecordKey);
var webhooks = parseResult.GetValue(Webhooks);
Expand All @@ -140,6 +152,7 @@ await CliRuntime.RunAsync(async () =>
timeout: timeout,
memory: memory,
maxItems: maxItems,
maxTotalChargeUsd: maxTotalChargeUsd,
build: build,
outputRecordKey: outputRecordKey,
webhooks: webhooks,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,16 @@ internal static partial class ActorTasksActorTaskRunSyncGetDatasetItemsGetComman
",
};

private static Option<double?> MaxTotalChargeUsd { get; } = new(
name: @"--max-total-charge-usd")
{
Description = @"Specifies the maximum total cost of the run.
Use it to cap the total amount charged for all pricing models.
You can access the maximum cost in your Actor
by using the `ACTOR_MAX_TOTAL_CHARGE_USD` environment variable.
",
};

private static Option<string?> Build { get; } = new(
name: @"--build")
{
Expand Down Expand Up @@ -277,6 +287,7 @@ and its status.
command.Options.Add(Timeout);
command.Options.Add(Memory);
command.Options.Add(MaxItems);
command.Options.Add(MaxTotalChargeUsd);
command.Options.Add(Build);
command.Options.Add(Webhooks);
command.Options.Add(Format);
Expand Down Expand Up @@ -311,6 +322,7 @@ await CliRuntime.RunAsync(async () =>
var timeout = parseResult.GetValue(Timeout);
var memory = parseResult.GetValue(Memory);
var maxItems = parseResult.GetValue(MaxItems);
var maxTotalChargeUsd = parseResult.GetValue(MaxTotalChargeUsd);
var build = parseResult.GetValue(Build);
var webhooks = parseResult.GetValue(Webhooks);
var format = parseResult.GetValue(Format);
Expand Down Expand Up @@ -344,6 +356,7 @@ await CliRuntime.RunAsync(async () =>
timeout: timeout,
memory: memory,
maxItems: maxItems,
maxTotalChargeUsd: maxTotalChargeUsd,
build: build,
webhooks: webhooks,
format: format,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ internal static partial class ActorTasksActorTaskRunSyncGetDatasetItemsPostComma
private static Option<double?> MaxTotalChargeUsd { get; } = new(
name: @"--max-total-charge-usd")
{
Description = @"Specifies the maximum cost of the run. This parameter is
useful for pay-per-event Actors, as it allows you to limit the amount
charged to your subscription. You can access the maximum cost in your Actor
Description = @"Specifies the maximum total cost of the run.
Use it to cap the total amount charged for all pricing models.
You can access the maximum cost in your Actor
by using the `ACTOR_MAX_TOTAL_CHARGE_USD` environment variable.
",
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ internal static partial class ActorTasksActorTaskRunSyncPostCommandApiCommand
private static Option<double?> MaxTotalChargeUsd { get; } = new(
name: @"--max-total-charge-usd")
{
Description = @"Specifies the maximum cost of the run. This parameter is
useful for pay-per-event Actors, as it allows you to limit the amount
charged to your subscription. You can access the maximum cost in your Actor
Description = @"Specifies the maximum total cost of the run.
Use it to cap the total amount charged for all pricing models.
You can access the maximum cost in your Actor
by using the `ACTOR_MAX_TOTAL_CHARGE_USD` environment variable.
",
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ internal static partial class ActorTasksActorTaskRunsPostCommandApiCommand
private static Option<double?> MaxTotalChargeUsd { get; } = new(
name: @"--max-total-charge-usd")
{
Description = @"Specifies the maximum cost of the run. This parameter is
useful for pay-per-event Actors, as it allows you to limit the amount
charged to your subscription. You can access the maximum cost in your Actor
Description = @"Specifies the maximum total cost of the run.
Use it to cap the total amount charged for all pricing models.
You can access the maximum cost in your Actor
by using the `ACTOR_MAX_TOTAL_CHARGE_USD` environment variable.
",
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ private static string FormatResponse(ParseResult parseResult, string value, glob
public static Command Create()
{
var command = new Command(@"act-delete", @"Delete Actor
Deletes an Actor.");
Deletes an Actor with the specified ID.");
command.Arguments.Add(ActorId);


Expand Down
136 changes: 68 additions & 68 deletions src/cli/Apify.CLI/Commands/ActorsActPutCommandApiCommand.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@ internal static partial class ActorsActPutCommandApiCommand
private static Option<string?> NameOption { get; } = new(
name: @"--name")
{
Description = @"",
Description = @"The identifier of the Actor. Use lowercase letters, numbers, and hyphens. Spaces or special characters aren't allowed. Must be unique across your account.",
};

private static Option<string?> DescriptionOption { get; } = new(
name: @"--description")
{
Description = @"",
Description = @"Short description of the Actor, displayed in Apify Store and Console.",
};

private static Option<bool?> IsPublic { get; } = CliRuntime.CreateNullableBoolOption(
name: @"--is-public",
description: @"");
description: @"Whether the Actor is available to users in Apify Store. If `false`, the Actor is private and only visible to you.");

private static Option<global::Apify.ActorPermissionLevel?> ActorPermissionLevel { get; } = new(
name: @"--actor-permission-level")
Expand All @@ -38,25 +38,25 @@ internal static partial class ActorsActPutCommandApiCommand
private static Option<string?> SeoTitle { get; } = new(
name: @"--seo-title")
{
Description = @"",
Description = @"Name of the Actor to display by search engines such as Google. Can be different from the Actor's name displayed in Apify Store and Console. Recommended length is 40-50 characters.",
};

private static Option<string?> SeoDescription { get; } = new(
name: @"--seo-description")
{
Description = @"",
Description = @"Description of the Actor to display by search engines such as Google. Recommended length is 140-156 characters.",
};

private static Option<string?> Title { get; } = new(
name: @"--title")
{
Description = @"",
Description = @"Human-readable name of the Actor, displayed in Apify Store and Console. Can contain spaces and capital letters. Recommended length is 40-50 characters. You can change this title without affecting the Actor's URL or SEO.",
};

private static Option<global::System.Collections.Generic.IList<global::Apify.CreateOrUpdateVersionRequest>?> Versions { get; } = new(
name: @"--versions")
{
Description = @"",
Description = @"An array of `Version` objects. Each object represents a specific version of the Actor's source code: its location, builds, and environment configuration.",
};

private static Option<global::System.Collections.Generic.IList<global::Apify.ActorRunPricingInfo>?> PricingInfos { get; } = new(
Expand All @@ -68,56 +68,18 @@ internal static partial class ActorsActPutCommandApiCommand
private static Option<global::System.Collections.Generic.IList<string>?> Categories { get; } = new(
name: @"--categories")
{
Description = @"",
Description = @"A list of categories that best define the Actor. Reflected in Apify Store's search and filtering options.",
};

private static Option<global::System.Collections.Generic.Dictionary<string, global::Apify.BuildTag?>?> TaggedBuilds { get; } = new(
name: @"--tagged-builds")
{
Description = @"An object to modify tags on the Actor's builds. The key is the tag name (e.g., _latest_), and the value is either an object with a `buildId` or `null`.

This operation is a patch; any existing tags that you omit from this object will be preserved.

- **To create or reassign a tag**, provide the tag name with a `buildId`. e.g., to assign the _latest_ tag:

&nbsp;

```json
{
""latest"": {
""buildId"": ""z2EryhbfhgSyqj6Hn""
}
}
```

- **To remove a tag**, provide the tag name with a `null` value. e.g., to remove the _beta_ tag:

&nbsp;

```json
{
""beta"": null
}
```

- **To perform multiple operations**, combine them. The following reassigns _latest_ and removes _beta_, while preserving any other existing tags.

&nbsp;

```json
{
""latest"": {
""buildId"": ""z2EryhbfhgSyqj6Hn""
},
""beta"": null
}
```
",
Description = @"A dictionary that maps tag names to specific builds. For details, see [Update build tags](#update-build-tags).",
};

private static Option<bool?> IsDeprecated { get; } = CliRuntime.CreateNullableBoolOption(
name: @"--is-deprecated",
description: @"");
description: @"Whether the Actor is deprecated.");
private static readonly DefaultRunOptionsOptionSet DefaultRunOptionsOptions = DefaultRunOptionsOptionSet.Create(@"default-run");

private static readonly ActorStandbyOptionSet ActorStandbyOptions = ActorStandbyOptionSet.Create(@"actor-standby");
Expand Down Expand Up @@ -163,26 +125,64 @@ private static string FormatResponse(ParseResult parseResult, global::Apify.Acto
public static Command Create()
{
var command = new Command(@"act-put", @"Update Actor
Updates settings of an Actor using values specified by an Actor object
passed as JSON in the POST payload.
If the object does not define a specific property, its value will not be
updated.

The response is the full Actor object as returned by the
[Get Actor](#/reference/actors/actor-object/get-actor) endpoint.

The request needs to specify the `Content-Type: application/json` HTTP header!

When providing your API authentication token, we recommend using the
request's `Authorization` header, rather than the URL. ([More
info](#/introduction/authentication)).

If you want to make your Actor
[public](https://docs.apify.com/platform/actors/publishing) using `isPublic:
true`, you will need to provide the Actor's `title` and the `categories`
under which that Actor will be classified in Apify Store. For this, it's
best to use the [constants from our `apify-shared-js`
package](https://github.com/apify/apify-shared-js/blob/2d43ebc41ece9ad31cd6525bd523fb86939bf860/packages/consts/src/consts.ts#L452-L471).
Updates an Actor's settings with the values specified in an `Actor` object
passed as JSON in the POST payload. Only the fields specified in the request body are updated.

Returns the full `Actor` object, the same as the
[Get Actor](/api/v2/act-get) endpoint.

In the HTTP request, set the `Content-Type` header to `application/json`.

### Authentication

To provide the authentication token, we recommend using the request's
`Authorization` header, rather than the URL. For details,
see [Authentication](/api/v2/getting-started#authentication).

### Make an Actor public

To make your Actor [public](https://docs.apify.com/platform/actors/publishing):
- Set `isPublic` to `true`.
- Provide `title` and `categories`. For reference, see [constants from the `apify-shared-js`
package](https://github.com/apify/apify-shared-js/blob/2d43ebc41ece9ad31cd6525bd523fb86939bf860/packages/consts/src/consts.ts#L452-L471)

### Update build tags

To change tags assigned to Actor builds, use the `taggedBuilds` object. It's a dictionary that maps tag names
to specific builds, where:
- the key is the tag name, for example `latest` or `beta`
- the value is either `null` or an object with a build ID

Changing tags is a patch operation. Only the tags that you provide in this object are updated.

Note that you can assign multiple tags to a single build, but you can't assign the same tag to multiple builds.

- To create or reassign a tag, provide the tag name with a build ID. For example, to assign
the `latest` tag to a build, use:

```json
{
""latest"": { ""buildId"": ""z2EryhbfhgSyqj6Hn"" }
}
```

- To remove a tag from a build, provide the tag name with a `null` value. For example, to remove the `beta` tag, use:

```json
{
""beta"": null
}
```

- You can perform multiple actions at once. The following example reassigns `latest`
and removes `beta`, while preserving other existing tags:

```json
{
""latest"": { ""buildId"": ""z2EryhbfhgSyqj6Hn"" },
""beta"": null
}
```
");
command.Arguments.Add(ActorId);
command.Options.Add(NameOption);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ response. Defaults to `OUTPUT`. Actors aren't required to store a record
private static Option<double?> MaxTotalChargeUsd { get; } = new(
name: @"--max-total-charge-usd")
{
Description = @"Specifies the maximum cost of the run. This parameter is
useful for pay-per-event Actors, as it allows you to limit the amount
charged to your subscription. You can access the maximum cost in your Actor
Description = @"Specifies the maximum total cost of the run.
Use it to cap the total amount charged for all pricing models.
You can access the maximum cost in your Actor
by using the `ACTOR_MAX_TOTAL_CHARGE_USD` environment variable.
",
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ internal static partial class ActorsActorRunsActRunSyncGetDatasetItemsGetCommand
private static Option<double?> MaxTotalChargeUsd { get; } = new(
name: @"--max-total-charge-usd")
{
Description = @"Specifies the maximum cost of the run. This parameter is
useful for pay-per-event Actors, as it allows you to limit the amount
charged to your subscription. You can access the maximum cost in your Actor
Description = @"Specifies the maximum total cost of the run.
Use it to cap the total amount charged for all pricing models.
You can access the maximum cost in your Actor
by using the `ACTOR_MAX_TOTAL_CHARGE_USD` environment variable.
",
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ internal static partial class ActorsActorRunsActRunSyncGetDatasetItemsPostComman
private static Option<double?> MaxTotalChargeUsd { get; } = new(
name: @"--max-total-charge-usd")
{
Description = @"Specifies the maximum cost of the run. This parameter is
useful for pay-per-event Actors, as it allows you to limit the amount
charged to your subscription. You can access the maximum cost in your Actor
Description = @"Specifies the maximum total cost of the run.
Use it to cap the total amount charged for all pricing models.
You can access the maximum cost in your Actor
by using the `ACTOR_MAX_TOTAL_CHARGE_USD` environment variable.
",
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ response. Defaults to `OUTPUT`. Actors aren't required to store a record
private static Option<double?> MaxTotalChargeUsd { get; } = new(
name: @"--max-total-charge-usd")
{
Description = @"Specifies the maximum cost of the run. This parameter is
useful for pay-per-event Actors, as it allows you to limit the amount
charged to your subscription. You can access the maximum cost in your Actor
Description = @"Specifies the maximum total cost of the run.
Use it to cap the total amount charged for all pricing models.
You can access the maximum cost in your Actor
by using the `ACTOR_MAX_TOTAL_CHARGE_USD` environment variable.
",
};
Expand Down
Loading