@pulumiverse/scaleway
Version:
A Pulumi package for creating and managing Scaleway cloud resources.
341 lines • 13.4 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as outputs from "../types/output";
/**
* The `scaleway.audittrail.getEvent` data source is used to retrieve information about existing Audit Trail events.
*
* Refer to the Audit Trail [documentation](https://www.scaleway.com/en/docs/audit-trail/) and [API documentation](https://www.scaleway.com/en/developers/api/audit-trail/) for more information.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* // Retrieve audit trail for a specific resource
* const findByResourceId = scaleway.audittrail.getEvent({
* resourceId: "11111111-1111-1111-1111-111111111111",
* });
* ```
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* // Retrieve all audit trail events on the default organization
* const findAll = scaleway.audittrail.getEvent({});
* ```
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* // Retrieve audit trail for a specific Scaleway product
* const findByProductName = scaleway.audittrail.getEvent({
* productName: "secret-manager",
* });
* ```
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* // Retrieve audit trail events with various filtering
* const findWithFilters = scaleway.audittrail.getEvent({
* region: "fr-par",
* serviceName: "instance",
* methodName: "CreateServer",
* principalId: "11111111-1111-1111-1111-111111111111",
* sourceIp: "192.0.2.1",
* status: 200,
* recordedAfter: "2025-10-01T00:00:00Z",
* recordedBefore: "2025-12-31T23:59:59Z",
* orderBy: "recorded_at_desc",
* });
* ```
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* // Retrieve audit trail events on a specific organization
* const findByOrg = scaleway.audittrail.getEvent({
* organizationId: "11111111-1111-1111-1111-111111111111",
* });
* ```
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* // Retrieve audit trail events on a specific project
* const findByProject = scaleway.audittrail.getEvent({
* projectId: "11111111-1111-1111-1111-111111111111",
* });
* ```
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* // Retrieve audit trail events for a specific type of resource
* const findByResourceType = scaleway.audittrail.getEvent({
* resourceType: "instance_server",
* });
* ```
*/
export declare function getEvent(args?: GetEventArgs, opts?: pulumi.InvokeOptions): Promise<GetEventResult>;
/**
* A collection of arguments for invoking getEvent.
*/
export interface GetEventArgs {
/**
* Name of the method of the API call performed.
*/
methodName?: string;
/**
* Defines the order in which events are returned. Possible values are `recordedAtAsc` and `recordedAtDesc`. Default value: `recordedAtDesc`.
*/
orderBy?: string;
/**
* `organizationId`) ID of the Organization containing the Audit Trail events.
*/
organizationId?: string;
/**
* ID of the User or IAM application at the origin of the event.
*/
principalId?: string;
/**
* Name of the Scaleway product in a hyphenated format.
*/
productName?: string;
/**
* ID of the Project containing the Audit Trail events.
*/
projectId?: string;
/**
* The `recordedAfter` parameter defines the earliest timestamp from which Audit Trail events are retrieved. Returns `one hour ago` by default (Format ISO 8601).
*/
recordedAfter?: string;
/**
* The `recordedBefore` parameter defines the latest timestamp up to which Audit Trail events are retrieved. Must be later than recorded_after. Returns `now` by default (Format ISO 8601).
*/
recordedBefore?: string;
/**
* The region you want to target. Defaults to the region specified in the provider configuration.
*/
region?: string;
/**
* ID of the Scaleway resource associated with the listed events.
*/
resourceId?: string;
/**
* Type of the scaleway resources associated with the listed events. Possible values are: `secmSecret`, `secmSecretVersion`, `kubeCluster`, `kubePool`, `kubeNode`, `kubeAcl`, `keymKey`, `iamUser`, `iamApplication`, `iamGroup`, `iamPolicy`, `iamApiKey`, `iamSshKey`, `iamRule`, `iamSaml`, `iamSamlCertificate`, `secretManagerSecret`, `secretManagerVersion`, `keyManagerKey`, `accountUser`, `accountOrganization`, `accountProject`, `instanceServer`, `instancePlacementGroup`, `instanceSecurityGroup`, `instanceVolume`, `instanceSnapshot`, `instanceImage`, `appleSiliconServer`, `baremetalServer`, `baremetalSetting`, `ipamIp`, `sbsVolume`, `sbsSnapshot`, `loadBalancerLb`, `loadBalancerIp`, `loadBalancerFrontend`, `loadBalancerBackend`, `loadBalancerRoute`, `loadBalancerAcl`, `loadBalancerCertificate`, `sfsFilesystem`, or `vpcPrivateNetwork`.
*/
resourceType?: string;
/**
* Name of the service of the API call performed.
*/
serviceName?: string;
/**
* IP address at the origin of the event.
*/
sourceIp?: string;
/**
* HTTP status code of the request.
*/
status?: number;
}
/**
* A collection of values returned by getEvent.
*/
export interface GetEventResult {
/**
* List of Audit Trail events matching the requested criteria.
*/
readonly events: outputs.audittrail.GetEventEvent[];
/**
* The provider-assigned unique ID for this managed resource.
*/
readonly id: string;
/**
* API method called to trigger the event.
*/
readonly methodName?: string;
readonly orderBy?: string;
/**
* ID of the Organization containing the Audit Trail events. (UUID format)
*/
readonly organizationId: string;
/**
* ID of the user or IAM application at the origin of the event.
*/
readonly principalId?: string;
/**
* Scaleway product associated with the listed events in a hyphenated format. Possible values are: `secret-manager`, `key-manager`, `iam`, `kubernetes`, `account`, `apple-silicon`, `instance`, `baremetal`, `load-balancer`, or `edge-services`.
*/
readonly productName?: string;
/**
* Project of the resource attached to the event. (UUID format)
*/
readonly projectId?: string;
readonly recordedAfter?: string;
readonly recordedBefore?: string;
readonly region?: string;
readonly resourceId?: string;
readonly resourceType?: string;
/**
* API name called to trigger the event. Possible values are: `scaleway.secret_manager.v1beta1.Api`, `scaleway.key_manager.v1alpha1.Api`, `scaleway.iam.v1alpha1.Api`, `scaleway.iam.v1alpha1.UnauthenticatedApi`, `scaleway.k8s.v1.Api`, `scaleway.account.v3.UserApi`, `scaleway.account.v3.OrganizationApi`, `scaleway.account.v2.GDPRApi`, `scaleway.apple_silicon.v1alpha1.Api`, `scaleway.instance.v1.Api`, `scaleway.baremetal.v1.Api`, or `scaleway.lb.v1.ZonedApi`.
*/
readonly serviceName?: string;
/**
* IP address at the origin of the event. (IP address)
*/
readonly sourceIp?: string;
readonly status?: number;
}
/**
* The `scaleway.audittrail.getEvent` data source is used to retrieve information about existing Audit Trail events.
*
* Refer to the Audit Trail [documentation](https://www.scaleway.com/en/docs/audit-trail/) and [API documentation](https://www.scaleway.com/en/developers/api/audit-trail/) for more information.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* // Retrieve audit trail for a specific resource
* const findByResourceId = scaleway.audittrail.getEvent({
* resourceId: "11111111-1111-1111-1111-111111111111",
* });
* ```
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* // Retrieve all audit trail events on the default organization
* const findAll = scaleway.audittrail.getEvent({});
* ```
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* // Retrieve audit trail for a specific Scaleway product
* const findByProductName = scaleway.audittrail.getEvent({
* productName: "secret-manager",
* });
* ```
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* // Retrieve audit trail events with various filtering
* const findWithFilters = scaleway.audittrail.getEvent({
* region: "fr-par",
* serviceName: "instance",
* methodName: "CreateServer",
* principalId: "11111111-1111-1111-1111-111111111111",
* sourceIp: "192.0.2.1",
* status: 200,
* recordedAfter: "2025-10-01T00:00:00Z",
* recordedBefore: "2025-12-31T23:59:59Z",
* orderBy: "recorded_at_desc",
* });
* ```
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* // Retrieve audit trail events on a specific organization
* const findByOrg = scaleway.audittrail.getEvent({
* organizationId: "11111111-1111-1111-1111-111111111111",
* });
* ```
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* // Retrieve audit trail events on a specific project
* const findByProject = scaleway.audittrail.getEvent({
* projectId: "11111111-1111-1111-1111-111111111111",
* });
* ```
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* // Retrieve audit trail events for a specific type of resource
* const findByResourceType = scaleway.audittrail.getEvent({
* resourceType: "instance_server",
* });
* ```
*/
export declare function getEventOutput(args?: GetEventOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetEventResult>;
/**
* A collection of arguments for invoking getEvent.
*/
export interface GetEventOutputArgs {
/**
* Name of the method of the API call performed.
*/
methodName?: pulumi.Input<string | undefined>;
/**
* Defines the order in which events are returned. Possible values are `recordedAtAsc` and `recordedAtDesc`. Default value: `recordedAtDesc`.
*/
orderBy?: pulumi.Input<string | undefined>;
/**
* `organizationId`) ID of the Organization containing the Audit Trail events.
*/
organizationId?: pulumi.Input<string | undefined>;
/**
* ID of the User or IAM application at the origin of the event.
*/
principalId?: pulumi.Input<string | undefined>;
/**
* Name of the Scaleway product in a hyphenated format.
*/
productName?: pulumi.Input<string | undefined>;
/**
* ID of the Project containing the Audit Trail events.
*/
projectId?: pulumi.Input<string | undefined>;
/**
* The `recordedAfter` parameter defines the earliest timestamp from which Audit Trail events are retrieved. Returns `one hour ago` by default (Format ISO 8601).
*/
recordedAfter?: pulumi.Input<string | undefined>;
/**
* The `recordedBefore` parameter defines the latest timestamp up to which Audit Trail events are retrieved. Must be later than recorded_after. Returns `now` by default (Format ISO 8601).
*/
recordedBefore?: pulumi.Input<string | undefined>;
/**
* The region you want to target. Defaults to the region specified in the provider configuration.
*/
region?: pulumi.Input<string | undefined>;
/**
* ID of the Scaleway resource associated with the listed events.
*/
resourceId?: pulumi.Input<string | undefined>;
/**
* Type of the scaleway resources associated with the listed events. Possible values are: `secmSecret`, `secmSecretVersion`, `kubeCluster`, `kubePool`, `kubeNode`, `kubeAcl`, `keymKey`, `iamUser`, `iamApplication`, `iamGroup`, `iamPolicy`, `iamApiKey`, `iamSshKey`, `iamRule`, `iamSaml`, `iamSamlCertificate`, `secretManagerSecret`, `secretManagerVersion`, `keyManagerKey`, `accountUser`, `accountOrganization`, `accountProject`, `instanceServer`, `instancePlacementGroup`, `instanceSecurityGroup`, `instanceVolume`, `instanceSnapshot`, `instanceImage`, `appleSiliconServer`, `baremetalServer`, `baremetalSetting`, `ipamIp`, `sbsVolume`, `sbsSnapshot`, `loadBalancerLb`, `loadBalancerIp`, `loadBalancerFrontend`, `loadBalancerBackend`, `loadBalancerRoute`, `loadBalancerAcl`, `loadBalancerCertificate`, `sfsFilesystem`, or `vpcPrivateNetwork`.
*/
resourceType?: pulumi.Input<string | undefined>;
/**
* Name of the service of the API call performed.
*/
serviceName?: pulumi.Input<string | undefined>;
/**
* IP address at the origin of the event.
*/
sourceIp?: pulumi.Input<string | undefined>;
/**
* HTTP status code of the request.
*/
status?: pulumi.Input<number | undefined>;
}
//# sourceMappingURL=getEvent.d.ts.map