text:
"""Auto-generated file, do not edit by hand. DE metadata"""
from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata

PHONE_METADATA_DE = PhoneMetadata(id='DE', country_code=None, international_prefix=None,
    general_desc=PhoneNumberDesc(national_number_pattern='1\\d\\d(?:\\d{2,3})?', possible_length=(3, 5, 6)),
    toll_free=PhoneNumberDesc(national_number_pattern='11(?:[02]|6\\d{3})', example_number='110', possible_length=(3, 6)),
    emergency=PhoneNumberDesc(national_number_pattern='11[02]', example_number='110', possible_length=(3,)),
    short_code=PhoneNumberDesc(national_number_pattern='11(?:[025]|6(?:00[06]|1(?:1[167]|23))|800\\d)|118\\d\\d', example_number='110', possible_length=(3, 5, 6)),
    short_data=True)


text:
'use strict';

var _ = require('lodash');
var bs58 = require('bs58');
var buffer = require('buffer');

var ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'.split('');

var Base58 = function Base58(obj) {
  /* jshint maxcomplexity: 8 */
  if (!(this instanceof Base58)) {
    return new Base58(obj);
  }
  if (Buffer.isBuffer(obj)) {
    var buf = obj;
    this.fromBuffer(buf);
  } else if (typeof obj === 'string') {
    var str = obj;
    this.fromString(str);
  } else if (obj) {
    this.set(obj);
  }
};

Base58.validCharacters = function validCharacters(chars) {
  if (buffer.Buffer.isBuffer(chars)) {
    chars = chars.toString();
  }
  return _.every(_.map(chars, function(char) { return (ALPHABET.includes(char)) }));
};

Base58.prototype.set = function(obj) {
  this.buf = obj.buf || this.buf || undefined;
  return this;
};

Base58.encode = function(buf) {
  if (!buffer.Buffer.isBuffer(buf)) {
    throw new Error('Input should be a buffer');
  }
  return bs58.encode(buf);
};

Base58.decode = function(str) {
  if (typeof str !== 'string') {
    throw new Error('Input should be a string');
  }
  return new Buffer(bs58.decode(str));
};

Base58.prototype.fromBuffer = function(buf) {
  this.buf = buf;
  return this;
};

Base58.prototype.fromString = function(str) {
  var buf = Base58.decode(str);
  this.buf = buf;
  return this;
};

Base58.prototype.toBuffer = function() {
  return this.buf;
};

Base58.prototype.toString = function() {
  return Base58.encode(this.buf);
};

module.exports = Base58;

redpajama_set_name: RedPajamaGithub


text:
module Filterable
  extend ActiveSupport::Concern

  module ClassMethods
  # Call the class methods with the same name as the keys in <tt>filtering_params</tt>
  # with their associated values. Most useful for calling named scopes from
  # URL params. Make sure you don't pass stuff directly from the web without
  # whitelisting only the params you care about first!
    def filter(filtering_params)
      results = self.where(nil)
      filtering_params.each do |key, value|
        results = results.public_send(key, value) if value.present?
      end
      results
    end
  end
end


text:
<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright (c) 2018, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~      http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <parent>
        <artifactId>1.2-admin-user-manage-user-accounts</artifactId>
        <groupId>org.wso2.is</groupId>
        <relativePath>../pom.xml</relativePath>
        <version>5.8.0</version>
    </parent>

    <modelVersion>4.0.0</modelVersion>
    <artifactId>1.2.1-manage-users-with-scim2</artifactId>
    <name>Manage Users with SCIM 2.0</name>
    <packaging>jar</packaging>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <inherited>false</inherited>
                <version>2.12.4</version>
                <configuration>
                    <!--<argLine>-Xmx1024m -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5006</argLine>-->
                    <argLine>-Xmx1024m -Dorg.apache.jasper.compiler.disablejsr199=true</argLine>
                    <suiteXmlFiles>
                        <!--<suiteXmlFile>src/test/resources/testng-server-mgt.xml</suiteXmlFile>-->
                        <suiteXmlFile>src/test/resources/testng.xml</suiteXmlFile>
                    </suiteXmlFiles>

                    <systemProperties>
                        <property>
                            <name>maven.test.haltafterfailure</name>
                            <value>false</value>
                        </property>
                        <property>
                            <name>framework.resource.location</name>
                            <value>
                                ${basedir}/src/test/resources/
                            </value>
                        </property>
                        <property>
                            <name>common.resource.location</name>
                            <value>
                                ${basedir}/../../../scenarios-commons/src/main/resources/
                            </value>
                        </property>
                        <property>
                            <name>server.list</name>
                            <value>
                                IS
                            </value>
                        </property>
                        <property>
                            <name>scim2.users.location</name>
                            <value>
                                ${basedir}/src/test/resources/scim2-users/
                            </value>
                        </property>
                    </systemProperties>
                    <workingDirectory>${basedir}/target</workingDirectory>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>

                    <execution>
                        <id>copyjacocodependencies</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.directory}/jacoco</outputDirectory>
                            <includeTypes>jar</includeTypes>
                            <includeArtifactIds>org.jacoco.agent</includeArtifactIds>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>2.4</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>test-jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-report-plugin</artifactId>
                <version>2.7.1</version>
                <configuration>
                    <outputDirectory>${basedir}/target/report</outputDirectory>
                    <outputName>registry-api-test</outputName>
                </configuration>
                <executions>
                    <execution>
                        <phase>integration-test</phase>
                        <goals>
                            <goal>report-only</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>org.wso2.is</groupId>
            <artifactId>scenarios-commons</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.apache.axis2.wso2</groupId>
                    <artifactId>axis2-client</artifactId>
                </exclusion>
            </exclusions>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpcore</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.googlecode.json-simple</groupId>
            <artifactId>json-simple</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>commons-httpclient</groupId>
            <artifactId>commons-httpclient</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>
</project>


text:
package peersim.core;

/**
* Instances of classes implementing this interface can form networks (graphs)
* in the simulator framework.
* The interface is similar to one of a container (containing neighbors),
* only the types of the contained elements have to be {@link Node}.
* The neighbor collection is defined in a random access list style, but
* it must follow the contract of a set too (elements must be unique).
* <p>
* Also note that there is no possibility to remove elements from the
* neighbor set. This is because removal is usually costly and it does not make
* sense in the context of our applications,
* where this interface is used for 1) initialization and 2)
* providing an interface for other protocols for accessing the neighbor list.
* Protocols that manage links remove, refresh, etc their link set internally
* or through custom methods.
* Therefore it would only put an unnecessary burden on implementors.
*/
public interface Linkable extends Cleanable {

	/**
	* Returns the size of the neighbor list.
	*/
	public int degree();

	/**
	* Returns the neighbor with the given index. The contract is that
	* listing the elements from index 0 to index degree()-1 should list
	* each element exactly once if this object is not modified in the
	* meantime. It throws an IndexOutOfBounds exception if i is negative
	* or larger than or equal to {@link #degree}.
	*/
	public Node getNeighbor(int i);

	/**
	* Add a neighbor to the current set of neighbors. If neighbor
	* is not yet a neighbor but it cannot be added from other reasons,
	* this method should not return normally, that is, it must throw
	* a runtime exception.
	* @return true if the neighbor has been inserted; false if the
	*    node is already a neighbor of this node
	*/
	public boolean addNeighbor(Node neighbour);

	/**
	* Returns true if the given node is a member of the neighbor set.
	*/
	public boolean contains(Node neighbor);

	/**
	* A possibility for optimization. An implementation should try to
	* compress its internal representation. Normally this is called
	* by initializers or other components when
	* no increase in the expected size of the neighborhood can be
	* expected.
	*/
	public void pack();
}


text:
//
// Copyright (c) 2014 XING AG (http://xing.com/)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

#import <Foundation/Foundation.h>

@interface XNGOAuthToken : NSObject

@property (readwrite, nonatomic, copy) NSString *key;
@property (readwrite, nonatomic, copy) NSString *secret;
@property (readwrite, nonatomic, copy) NSString *session;
@property (readwrite, nonatomic, strong) NSDate *expiration;
@property (nonatomic, copy) NSString *verifier;
@property (readwrite, nonatomic, assign, getter = canBeRenewed) BOOL renewable;
@property (readonly, nonatomic, assign, getter = isExpired) BOOL expired;
@property (nonatomic, strong) NSDictionary *userInfo;

- (id)initWithQueryString:(NSString *)queryString;
- (id)initWithKey:(NSString *)key
           secret:(NSString *)secret
          session:(NSString *)session
       expiration:(NSDate *)expiration
        renewable:(BOOL)canBeRenewed;
+ (NSDictionary *)parametersFromQueryString:(NSString *)queryString;

#ifdef _SECURITY_SECITEM_H_
///---------------------
/// @name Authenticating
///---------------------

/**
   Stores the specified OAuth token for a given web service identifier in the Keychain
   with the default Keychain Accessibility of kSecAttrAccessibleWhenUnlocked.

   @param token The OAuth credential to be stored.
   @param identifier The service identifier associated with the specified token.

   @return Whether or not the credential was stored in the keychain.
 */
+ (BOOL)storeCredential:(XNGOAuthToken *)credential
         withIdentifier:(NSString *)identifier;

/**
   Stores the specified OAuth token for a given web service identifier in the Keychain.

   @param token The OAuth credential to be stored.
   @param identifier The service identifier associated with the specified token.
   @param securityAccessibility The Keychain security accessibility to store the credential with.

   @return Whether or not the credential was stored in the keychain.
 */
+ (BOOL)storeCredential:(XNGOAuthToken *)credential
         withIdentifier:(NSString *)identifier
      withAccessibility:(id)securityAccessibility;

/**
   Retrieves the OAuth credential stored with the specified service identifier from the Keychain.

   @param identifier The service identifier associated with the specified credential.

   @return The retrieved OAuth token.
 */
+ (XNGOAuthToken *)retrieveCredentialWithIdentifier:(NSString *)identifier;

/**
   Deletes the OAuth token stored with the specified service identifier from the Keychain.

   @param identifier The service identifier associated with the specified token.

   @return Whether or not the token was deleted from the keychain.
 */
+ (BOOL)deleteCredentialWithIdentifier:(NSString *)identifier;

#endif

@end


text:
"""
The MIT License (MIT)

Copyright (c) 2016 Daniele Linguaglossa <d.linguaglossa@mseclab.com>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
"""
import os
import sys
import json
import socket
from ast import literal_eval
from .conf import CONF_PATH
from argparse import Namespace
from .pjf_version import PYJFUZZ_LOGO
from .pjf_grammar import generate_json
from . import GRAMMAR_PATH
from .errors import PJFInvalidType

class PJFConfiguration(Namespace):
    """
    A class that represent PyJFuzz startup configuration , it makes the standard checks
    """
    def __init__(self, arguments):
        """
        Init the command line
        """
        super(PJFConfiguration, self).__init__(**arguments.__dict__)
        setattr(self, "generate_json", generate_json)
        setattr(self, "grammar_path", GRAMMAR_PATH)
        if self.json:
            if type(self.json) != dict:
                if type(self.json) != list:
                    raise PJFInvalidType(self.json, dict)
        if self.level:
            if type(self.level) != int:
                raise PJFInvalidType(self.level, int)
        if self.techniques:
            if type(self.techniques) != str:
                raise PJFInvalidType(self.techniques, str)
        if self.command:
            if type(self.command) != list:
                raise PJFInvalidType(self.command, list)
        if self.parameters:
            if type(self.parameters) != str:
                raise PJFInvalidType(self.parameters, str)
        if not self.nologo:
            sys.stderr.write("{0}\n".format(PYJFUZZ_LOGO))
        if self.recheck_ports:
            if self.fuzz_web or self.web_server or self.browser_auto:
                with open(CONF_PATH, "rb") as config:
                    setattr(self, "ports", self.check_ports(json.loads(config.read())))
                    config.close()
        if self.parameters:
            self.parameters = str(self.parameters).split(",")
        if self.techniques:
            techniques = {
                "C": [10, 5, 13],
                "H": [9],
                "P": [6, 2, 8],
                "T": [11, 12],
                "R": [14],
                "S": [3, 1],
                "X": [0, 4, 7]
            }
            temp = []
            for technique in self.techniques:
                if technique in techniques:
                    temp += techniques[str(technique)]
            self.techniques = temp
        else:
            self.techniques = list(range(0, 14))
        if not self.utf8:
            self.utf8 = False
        if not self.command:
            self.command = ["echo"]
            self.stdin = True
        else:
            if "@@" in self.command:
                self.stdin = False
            else:
                self.stdin = True
        if not self.parameters:
            self.parameters = []
        if self.auto:
            self.json = self.generate_json(self.grammar_path)

    def __contains__(self, items):
        if type(items) != list:
            raise PJFInvalidType(type(items), list)
        for element in items:
            try:
                getattr(self, element)
            except AttributeError:
                return False
        return True

    def __getattr__(self, item):
        """
        Get a parameter from configuration, return False if parameter was not found
        """
        if item in self.__dict__:
            return self.__dict__[item]
        else:
            if item == "recheck_ports":
                return True
            return False

    def start(self):
        """
        Parse the command line and start PyJFuzz
        """
        from .pjf_worker import PJFWorker
        worker = PJFWorker(self)
        if self.update_pjf:
            worker.update_library()
        elif self.browser_auto:
            worker.browser_autopwn()
        elif self.fuzz_web:
            worker.web_fuzzer()
        elif self.json:
            if not self.web_server and not self.ext_fuzz and not self.cmd_fuzz:
                worker.fuzz()
            elif self.ext_fuzz:
                if self.stdin:
                    worker.fuzz_stdin()
                else:
                    worker.fuzz_command_line()
            elif self.cmd_fuzz:
                if self.stdin:
                    worker.fuzz_external(True)
                else:
                    worker.fuzz_external()
            else:
                worker.start_http_server()
        elif self.json_file:
            worker.start_file_fuzz()
        elif self.process_to_monitor:
            worker.start_process_monitor()

    def check_ports(self, ports):
            for p in ports["servers"]:
                try:
                    p_checker = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
                    p_checker.bind(("127.0.0.1", ports["servers"][p]))
                    p_checker.close()
                except socket.error as e:
                    if e.errno == 48:
                        print("[\033[92mINFO\033[0m] Port %s is already in use switching to different port" %
                              ports["servers"][p])
                        ports["servers"][p] = self.get_free_port()
            return ports

    def get_free_port(self):
        s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
        s.bind(('127.0.0.1', 0))
        port = s.getsockname()[1]
        s.close()
        return port

    @staticmethod
    def valid_dir(value):
        import argparse
        parser = argparse.ArgumentParser()
        if os.path.isdir(value):
            return value
        else:
            raise parser.error("Directory does not exists!")

    @staticmethod
    def valid_file(value):
        import argparse
        parser = argparse.ArgumentParser()
        try:
            with open(value, "rb") as html_file:
                html_file.close()
                return value
        except IOError:
            raise parser.error("File does not exists!")

    @staticmethod
    def valid_json(value):
        import argparse
        parser = argparse.ArgumentParser()
        try:
            try:
                value = literal_eval(value)
            except:
                value = json.loads(value)
            if type(value) not in (dict, list):
                raise SyntaxError
        except SyntaxError:
            raise parser.error("Please insert a valid JSON value!")
        return value


text:
package fake

import (
	internalversion "github.com/openshift/origin/pkg/security/generated/internalclientset/typed/security/internalversion"
	rest "k8s.io/client-go/rest"
	testing "k8s.io/client-go/testing"
)

type FakeSecurity struct {
	*testing.Fake
}

func (c *FakeSecurity) PodSecurityPolicyReviews(namespace string) internalversion.PodSecurityPolicyReviewInterface {
	return &FakePodSecurityPolicyReviews{c, namespace}
}

func (c *FakeSecurity) PodSecurityPolicySelfSubjectReviews(namespace string) internalversion.PodSecurityPolicySelfSubjectReviewInterface {
	return &FakePodSecurityPolicySelfSubjectReviews{c, namespace}
}

func (c *FakeSecurity) PodSecurityPolicySubjectReviews(namespace string) internalversion.PodSecurityPolicySubjectReviewInterface {
	return &FakePodSecurityPolicySubjectReviews{c, namespace}
}

func (c *FakeSecurity) SecurityContextConstraints() internalversion.SecurityContextConstraintsInterface {
	return &FakeSecurityContextConstraints{c}
}

// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *FakeSecurity) RESTClient() rest.Interface {
	var ret *rest.RESTClient
	return ret
}


text:
<?php

declare(strict_types=1);

namespace Haystack\Container;

use Haystack\HArray;

class HArrayContains
{
    /** @var HArray */
    private $arr;

    public function __construct(HArray $arr)
    {
        $this->arr = $arr;
    }

    /**
     * @param mixed $value
     * @return bool
     */
    public function contains($value): bool
    {
        return in_array($value, $this->arr->toArray(), false);
    }
}


text:
/*
 * Do not modify this file. This file is generated from the cloudhsm-2014-05-30.normal.json service model.
 */
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;

using Amazon.Runtime;
using Amazon.Runtime.Internal;

namespace Amazon.CloudHSM.Model
{
    /// <summary>
    /// Container for the parameters to the CreateHsm operation.
    /// Creates an uninitialized HSM instance. Running this command provisions an HSM appliance
    /// and will result in charges to your AWS account for the HSM.
    /// </summary>
    public partial class CreateHsmRequest : AmazonCloudHSMRequest
    {
        private string _clientToken;
        private string _eniIp;
        private string _externalId;
        private string _iamRoleArn;
        private string _sshKey;
        private string _subnetId;
        private SubscriptionType _subscriptionType;
        private string _syslogIp;

        /// <summary>
        /// Gets and sets the property ClientToken.
        /// <para>
        /// A user-defined token to ensure idempotence. Subsequent calls to this action with the
        /// same token will be ignored.
        /// </para>
        /// </summary>
        public string ClientToken
        {
            get { return this._clientToken; }
            set { this._clientToken = value; }
        }

        // Check to see if ClientToken property is set
        internal bool IsSetClientToken()
        {
            return this._clientToken != null;
        }

        /// <summary>
        /// Gets and sets the property EniIp.
        /// <para>
        /// The IP address to assign to the HSM's ENI.
        /// </para>
        /// </summary>
        public string EniIp
        {
            get { return this._eniIp; }
            set { this._eniIp = value; }
        }

        // Check to see if EniIp property is set
        internal bool IsSetEniIp()
        {
            return this._eniIp != null;
        }

        /// <summary>
        /// Gets and sets the property ExternalId.
        /// <para>
        /// The external ID from <b>IamRoleArn</b>, if present.
        /// </para>
        /// </summary>
        public string ExternalId
        {
            get { return this._externalId; }
            set { this._externalId = value; }
        }

        // Check to see if ExternalId property is set
        internal bool IsSetExternalId()
        {
            return this._externalId != null;
        }

        /// <summary>
        /// Gets and sets the property IamRoleArn.
        /// <para>
        /// The ARN of an IAM role to enable the AWS CloudHSM service to allocate an ENI on your
        /// behalf.
        /// </para>
        /// </summary>
        public string IamRoleArn
        {
            get { return this._iamRoleArn; }
            set { this._iamRoleArn = value; }
        }

        // Check to see if IamRoleArn property is set
        internal bool IsSetIamRoleArn()
        {
            return this._iamRoleArn != null;
        }

        /// <summary>
        /// Gets and sets the property SshKey.
        /// <para>
        /// The SSH public key to install on the HSM.
        /// </para>
        /// </summary>
        public string SshKey
        {
            get { return this._sshKey; }
            set { this._sshKey = value; }
        }

        // Check to see if SshKey property is set
        internal bool IsSetSshKey()
        {
            return this._sshKey != null;
        }

        /// <summary>
        /// Gets and sets the property SubnetId.
        /// <para>
        /// The identifier of the subnet in your VPC in which to place the HSM.
        /// </para>
        /// </summary>
        public string SubnetId
        {
            get { return this._subnetId; }
            set { this._subnetId = value; }
        }

        // Check to see if SubnetId property is set
        internal bool IsSetSubnetId()
        {
            return this._subnetId != null;
        }

        /// <summary>
        /// Gets and sets the property SubscriptionType.
        /// <para>
        /// The subscription type.
        /// </para>
        /// </summary>
        public SubscriptionType SubscriptionType
        {
            get { return this._subscriptionType; }
            set { this._subscriptionType = value; }
        }

        // Check to see if SubscriptionType property is set
        internal bool IsSetSubscriptionType()
        {
            return this._subscriptionType != null;
        }

        /// <summary>
        /// Gets and sets the property SyslogIp.
        /// <para>
        /// The IP address for the syslog monitoring server.
        /// </para>
        /// </summary>
        public string SyslogIp
        {
            get { return this._syslogIp; }
            set { this._syslogIp = value; }
        }

        // Check to see if SyslogIp property is set
        internal bool IsSetSyslogIp()
        {
            return this._syslogIp != null;
        }

    }
}


text:
<?php
namespace Myapp\ResponsableBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Kitpages\DataGridBundle\Grid\GridConfig;
use Kitpages\DataGridBundle\Paginator\PaginatorConfig;
use Kitpages\DataGridBundle\Grid\Field;
use Symfony\Component\HttpFoundation\Request;
use Myapp\ResponsableBundle\Entity\boutique;
use Myapp\ResponsableBundle\Entity\Image;
use Myapp\ResponsableBundle\Form\boutiqueType;
use Myapp\ResponsableBundle\Form\ImageForm;
use Symfony\Component\HttpFoundation\JsonResponse;
use Myapp\adminBundle\Entity\User;

class boutiqueController extends Controller {
    public function productListAction(Request $request)
    {

        $userId = $this->get('security.context')->getToken()->getUser();
        $repository = $this->getDoctrine()->getRepository('MyappResponsableBundle:boutique');

         $em=$this->container->get('doctrine')->getManager();  //instancier la doctrine et le manager
        $modele=$em->getRepository('MyappResponsableBundle:boutique')->findByUserId($userId);

        $queryBuilder = $repository->createQueryBuilder('boutique')->orderBy('boutique.nom')->groupBy('boutique.id')
            ->where('boutique.userId = :id_user')

            ->setParameter('id_user', $userId);
        $gridConfig = new GridConfig();
        $gridConfig
            ->setQueryBuilder($queryBuilder)
            ->setCountFieldName('boutique.id')
            ->addField(new Field('boutique.nom',['label'=>'Nom', 'filterable'=>true]))
            ->addField(new Field('boutique.categorie',['label'=>'Categorie', 'filterable'=>true]))
            ->addField(new Field('boutique.Fax',['label'=>'Description', 'filterable'=>true]))
            ->addField(new Field('boutique.numero_telephone',['label'=>'numero_telephone', 'filterable'=>true]))
            ->addField(new Field('boutique.Email',['label'=>'Email', 'filterable'=>true]))

            ->addField(new Field('boutique.promotion',['label'=>'promotion', 'filterable'=>true]))
               ;

//          ->addField('boutique.id', array(
//                'sortable' => true,
//                'formatValueCallback' => function($value)
////        {
////            return $value->format('Y/m/d');
////        }
//            ))
//                 // Paginator config
//    $this->setGridPaginato($gridConfig, 1);

     // paginator configuration
        $gridPaginatorConfig = new PaginatorConfig();
        $gridPaginatorConfig
                            ->setName($gridConfig->getName())
                            ->setCountFieldName($gridConfig->getCountFieldName())
                            ->setItemCountInPage(2);

        $gridConfig->setPaginatorConfig($gridPaginatorConfig);
       // $grid = $gridManager->getGrid($gridConfig, $request);
        $gridManager = $this->get('kitpages_data_grid.grid_manager');
        $grid = $gridManager->getGrid($gridConfig, $request);

        return $this->render('MyappResponsableBundle:Default:productList.html.twig', array(
            'grid' => $grid, 'modele'=>$modele));

    }
//    foreach ($ligneCmd as $cmd) {
//            $tab[$i] = $cmd;
//            $id = $tab[$i]->getProduit()->getId();
//            $cc = null;
//            if
//            ($id == $produit->getId()) {
//                $cc = $tab[$i];
//                break;
//            } else {
//
//            }
//            $i++;
//        }

    function ajout2Action(){
        $repository = $this->getDoctrine()->getRepository('MyappResponsableBundle:boutique');
        $userId = $this->get('security.context')->getToken()->getUser();//il est en train de recuperer el user
        $model=new boutique();
        $modelForm=new boutiqueType();
        $form = $this->createForm($modelForm, $model); //creation du formulaire //instancier un objet form qui quit un type qui est enrelation avec un type
        $request=$this->get('request');

        if($form ->handleRequest($request)->isValid()){
           // $model-> setUserId($userId);
            $em=$this->getDoctrine()->getManager();
            $model->setUserId($userId);

            $em->persist($model);
            $em->flush();
        return $this->redirect($this->generateUrl("respensablePages"));
        }
        return $this->render('MyappResponsableBundle:View2:ajout1.html.twig',array('f'=>$form->createView()));////une vue ne peut pas dessiner un objet c'est pour cela la methode createview l'aide pour dessiner ce formulaire
    }

//    function ajout2Action(){
//        $model=new boutique();//instanciation de lentite
//        $requette=$this->get('request');
//        if($requette->getMethod()=="POST")
//        {
//            $nom=$requette->get('nom'); //name qui est dans le formulaire //on est en train de recuperer
//            $categorie=$requette->get('categorie');//recupere
//            $Fax=$requette->get('Fax');
//            $numero_telephone=$requette->get('numero_telephone');
//            $Email=$requette->get('Email');
//            $promotion=$requette->get('promotion');//recupere
//            $Description=$requette->get('Description');
//
//            $model->setNom($nom);//set pour manipuler
//            $model->setCategorie($categorie);
//            $model->setFax($Fax);
//            $model->setNumero_telephone($numero_telephone);
//            $model->setEmail($Email);
//            $model->setPromotion($promotion);
//            $model->setDescription($Description);
//            $em=$this->getDoctrine()->getManager(); //on fait appel a l'entite manager qui est le gestionnaire des entites//
//            $em->persist($model); //persist =insert into table //l'orm persist des objets dans la base de donnees
//            $em->flush(); //exec executer a requete //il va faire la construction d une ligne
//       return $this->redirect($this->generateUrl("path_list"));
//        }
//        return $this->render('MyappResponsableBundle:View2:ajout.html.twig',array());
//
//    }

    function listAction(){

        $userId = $this->get('security.context')->getToken()->getUser();
        $em=$this->container->get('doctrine')->getManager();  //instancier la doctrine et le manager
        $modele=$em->getRepository('MyappResponsableBundle:boutique')->findByUserId($userId);
        return $this->render('MyappResponsableBundle:View2:list.html.twig',array('modele'=>$modele));

    }

    function list_categorie1Action(){
        $em=$this->container->get('doctrine')->getManager();  //instancier la doctrine et le manager
        $modele=$em->getRepository('MyappResponsableBundle:boutique')->findByCategorie('Fashion et Beaute');
    return $this->render('MyappResponsableBundle:View2:list_cat.html.twig',array('modele'=>$modele));
    }

    function list_categorie2Action(){
        $em=$this->container->get('doctrine')->getManager();  //instancier la doctrine et le manager
        $modele=$em->getRepository('MyappResponsableBundle:boutique')->findByCategorie('Electronique et Ordinateurs');
        return $this->render('MyappResponsableBundle:View2:list_cat.html.twig',array('modele'=>$modele));

    }
    function list_categorie4Action(){
        $em=$this->container->get('doctrine')->getManager();  //instancier la doctrine et le manager
        $modele=$em->getRepository('MyappResponsableBundle:boutique')->findByCategorie('Restauration');
        return $this->render('MyappResponsableBundle:View2:list_cat.html.twig',array('modele'=>$modele));

    }
        function ListCategorie3Action($nom){
            $em = $this->getDoctrine()->getManager();
        $modele = $em->getRepository('MyappResponsableBundle:boutique')->findByNom($nom);
        return $this->render('MyappResponsableBundle:View2:list_cat3.html.twig', array('modele' => $modele));
    }
    function ListPromotionAction(){
            $em = $this->getDoctrine()->getManager();
         $v ='0';
        $modele = $em->getRepository('MyappResponsableBundle:boutique')->findByPromotion($v);
        return $this->render('MyappResponsableBundle:View2:list_promotion.html.twig', array('modele' => $modele));
    }
    //////////////////////////
    function rechercheAction(){
        $em = $this->getDoctrine()->getManager();
        $modeles = $em->getRepository('MyappResponsableBundle:boutique')->findAll();
        $request = $this->getRequest();
        if ($request->getMethod()=="POST")
        {
        $search1=$request->get('search1');
        //$search2=$request->get('search2');
        $modeles=$em->getRepository('MyappResponsableBundle:boutique')->findBy(array("nom"=>$search1));
        // $modeles=$em->getRepository('CalendrierMedecinsBundle:Patient')->findBy(array("nom"=>$search1,"prenom"=>$search2));
     }

        return $this->render('MyappResponsableBundle:View1:rechercheBoutique.html.twig',array("modeles"=>$modeles));
    }

    function modifierAction($id){
       $em=$this->getDoctrine()->getManager();
        $modele= $em->getRepository('MyappResponsableBundle:boutique')->find($id);
        $modelform =new boutiqueType();
        $form=$this->createForm($modelform, $modele);//il faut i entite et le model form
        $request=$this->get('request');
        if($form->handleRequest($request)->isValid()){
            $em=$this->getDoctrine()->getManager();
            $em->persist($modele);
            $em->flush();
        return $this->redirect($this->generateUrl("path_list"));
        }
    return $this->render('MyappResponsableBundle:View2:update.html.twig',array('f'=>$form->createView()));
    }

    function supprimerAction($id){
        $em=$this->getDoctrine()->getManager();
        $modele = $em->getRepository('MyappResponsableBundle:boutique')->find($id);
        $em->remove($modele);
        $em->flush();
       return $this->redirect($this->generateUrl("respensablePages"));
    }

    public function rechercherAction() {
        $request = $this->getRequest();
        if($request->isXmlHttpRequest()) {

            $nomPhoto = '';
            $nomPhoto = $request->request->get('nomphoto');

            $em = $this->getDoctrine()->getEntityManager();

            if($nomPhoto != '') {
                $qb = $em->createQueryBuilder();

                $qb->select('p')
                    ->from('MyappResponsableBundle:boutique', 'p')
                    ->where("p.categorie LIKE :nomphoto")
                    ->setParameter('nomphoto', '%'.$nomPhoto.'%');

                $query = $qb->getQuery();
                $photos = $query->getResult();
            } else {
                $photos = $em->getRepository('MyappResponsableBundle:boutique')->findAll();
            }
            return $this->render('MyappResponsableBundle:boutique:RechTwig.html.twig', array(
                'photos' => $photos,
            ));
        } else {
            return $this->listerAction();
        }
    }

    public function villesAction($id)
    {
        $em = $this->getDoctrine()->getManager();
        $villeCodePostal = $em->getRepository('MyappResponsableBundle:boutique')->findOneBy(array('id' => $id));

        if ($villeCodePostal) {
            $ville = $villeCodePostal->getCategorie();
        } else {
            $ville = null;
        }

        $response = new JsonResponse();
        return $response->setData(array('ville' => $ville));
    }
     public function indexAction()
    {
        $repository = $this->container->get('custom.repository');
        $entities = $repository->getItems();

        return array('entities' => $entities);
    }
    function essaiAction(){

        return $this->render('MyappResponsableBundle:View2:javatwig.html.twig',array());

    }
    ////////////////////////////

//   public function imageAjoutFAction(Request $request)
//    {
//    // On crée un objet Advert
//    $image = new Image2();
//
//    // On crée le FormBuilder grâce au service form factory
//    $form = $this->get('form.factory')->createBuilder('form', $image)
//
//    // On ajoute les champs de l'entité que l'on veut ? notre formulaire
//
//    ->add('imageName',      'text')
//    ->add('imageFile',     'file')
//    ->add('save',      'submit')
//    ->getForm()
//    ;
//
//    $form->handleRequest($request);
//
//    // On vérifie que les valeurs entrées sont correctes
//    // (Nous verrons la validation des objets en détail dans le prochain chapitre)
//    if ($form->isValid()) {
//      // On l'enregistre notre objet $advert dans la base de données, par exemple
//      $em = $this->getDoctrine()->getManager();
//
//      $em->persist($image);
//
//      $em->flush();
//
//      $request->getSession()->getFlashBag()->add('notice', 'Annonce bien enregistrée.');
//
//      // On redirige vers la page de visualisation de l'annonce nouvellement créée
//      //return $this->redirect($this->generateUrl('oc_platform_view', array('id' => $advert->getId())));
//    return $this->render('MyappResponsableBundle:View1nour:add.html.twig', array(
//      'form' => $form->createView(),
//    ));
//    }
//
//    return $this->render('MyappResponsableBundle:View1nour:add.html.twig', array(
//      'form' => $form->createView(),
//    ));
//    }
//    public function afficherImagePAction()
//    {
//        $em=$this->container->get('doctrine')->getManager();
//
//        $entity=$em->getRepository("MyappResponsableBundle:Image2")->findAll();
//        $e=new ImageType();
//        $form=$this->createForm($e, $entity);
////$helper = $this->container->get('vich_uploader.templating.helper.uploader_helper');
////$path = $helper->asset($entity, 'imageFile');
//        return $this->render('MyappResponsableBundle:View1nour:afficherImage.html.twig', array('product' => $entity,'f'=>$form->createView()));
//    }
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<StrolchModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="https://strolch.li/xsd/StrolchModel-1.6.xsd"
              xsi:schemaLocation="https://strolch.li/xsd/StrolchModel-1.6.xsd StrolchModel.xsd">

    <Resource Id="yellowBall" Name="Yellow Ball" Type="Ball">
        <ParameterBag Id="parameters" Name="Parameters" Type="Parameters">
            <Parameter Id="color" Name="Color" Type="String" Value="yellow"/>
        </ParameterBag>
    </Resource>

</StrolchModel>


text:
Amazon Web Services Guard Duty Service (gd)
Use this integration to detect and manage threats to your AWS system. We recommend that you use roles that have the following
built-in AWS policies:

* _AmazonGuardDutyFullAccess_
* _AmazonGuardDutyReadOnlyAccess_

For detailed instructions about setting up authentication, see: [AWS Integrations - Authentication](https://xsoar.pan.dev/docs/reference/articles/aws-integrations---authentication).

## Prerequisites

It is important that you familiarize yourself with and complete all steps detailed in
the [Amazon AWS Integrations Configuration Guide](https://xsoar.pan.dev/docs/reference/articles/aws-integrations---authentication)

Some changes have been made that might affect your existing content.
If you are upgrading from a previous of this integration, see [Breaking Changes](#breaking-changes-from-the-previous-version-of-this-integration---aws-guardduty).

## Configure AWS - GuardDuty on Cortex XSOAR

1. Navigate to **Settings** > **Integrations** > **Servers & Services**.
2. Search for AWS - GuardDuty.
3. Click **Add instance** to create and configure a new integration instance.

    | **Parameter** | **Description** | **Required** |
    | --- |------| --- |
    | AWS Default Region | The AWS Region for this instance of the integration. For example, us-west-2 | True |
    | Role Arn | The Amazon Resource Name (ARN) role used for EC2 instance authentication. If this is used, an access key and secret key are not required. | False |
    | Fetch incidents |  | False |
    | Incident type | Incident type | False |
    | Role Session Name | A descriptive name for the assumed role session. For example, xsiam-IAM.integration-Role_SESSION | False |
    | Role Session Duration | The maximum length of each session in seconds. Default: 900 seconds. The Cortex XSOAR integration will have the permissions assigned only when the session is initiated and for the defined duration. | False |
    | Access Key | The access key ID used for authentication, that was configured during IAM user configuration. If this is used, Role ARN is not required. | False |
    | Secret Key | The secret key used for authentication, that was configured during IAM user configuration. If this is used, Role ARN is not required. | False |
    | Timeout | The time in seconds until a timeout exception is reached. You can specify just the read timeout \(for example 60\) or also the connect timeout followed after a comma \(for example 60,10\). If a connect timeout is not specified, a default of 10 second will be used. | False |
    | Retries | The maximum number of retry attempts when connection or throttling errors are encountered. Set to 0 to disable retries. The default value is 5 and the limit is 10. Note: Increasing the number of retries will increase the execution time. | False |
    | How many incidents to fetch each time | Default `10` | False |
    | First fetch timestamp | First fetch query `<number> <time unit>`, e.g., `7 days`. Default `3 days`| False |
    | Guard Duty Severity level | The severity level or higher of findings to be fetched: Low, Medium, or High. For example, if you set the severity level to Medium, only findings with severity level Medium or High will be fetched. | False |
    | Archive findings After Fetch | You can set whether findings that are fetched will be moved to the GuardDuty archive. | False |
    | Incidents Fetch Interval | Time interval for fetching incidents. | False |
    | Trust any certificate (not secure) |  | False |
    | Use system proxy settings |  | False |

4. Click **Test** to validate the URLs, token, and connection.

## Fetched Incidents Data

* The integration fetches newly created Guard DutyFindings.
  Each integration instance can fetch findings from a single AWS Region.
* Each region can have a maximum of 1,000 member accounts that are linked to a guard duty master account. For more information see
  the [Amazon GuardDuty documentation](https://docs.aws.amazon.com/guardduty/latest/ug/guardduty_accounts.html).
* You can set the severity level of the findings to be fetched. "Low", "Medium", "High". For example, if you set the severity
  level to "Medium", the integration will only fetch findings with severity level of Medium and higher.

## Commands

You can execute these commands from the Cortex XSOAR CLI, as part of an automation, or in a playbook. After you successfully
execute a command, a DBot message appears in the War Room with the command details.

### aws-gd-create-detector
***
Create an AWS Guard Duty Detector on the integration instance specified aws account.

##### AWS IAM Policy Permission

Effect: _Allow_

Action: _guardduty:CreateDetector_

#### Base Command

`aws-gd-create-detector`
#### Input

| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| enabled | A boolean value that specifies whether the detector is to be enabled. Possible values are: True, False. Default is True. | Required |
| enableS3Logs | The status of S3 data event logs as a data source. Possible values are: True, False. | Optional |
| enableKubernetesLogs | The status of Kubernetes audit logs as a data source. Possible values are: True, False. | Optional |
| ebsVolumesMalwareProtection | Describes the configuration for scanning EBS volumes as a data source. Possible values are: True, False. | Optional |
| findingFrequency | Specifies how frequently updated findings are exported. Possible values are: Fifteen Minutes, One Hour, Six Hours. | Optional |
| region | The AWS Region, if not specified the default region will be used. | Optional |
| roleArn | The Amazon Resource Name (ARN) of the role to assume. | Optional |
| roleSessionName | An identifier for the assumed role session. | Optional |
| roleSessionDuration | The duration, in seconds, of the role session. The value can range from 900 seconds (15 minutes) up to the maximum session duration setting for the role. | Optional |

#### Context Output

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| AWS.GuardDuty.Detectors.DetectorId | string | The unique ID of the created detector. |

#### Command Example

```!aws-gd-create-detector enabled=True region=eu-west-2```

### aws-gd-delete-detector
***
Deletes a Amazon GuardDuty detector specified by the detector ID.

##### AWS IAM Policy Permission

Effect: _Allow_

Action: _guardduty:DeleteDetector_

#### Base Command

`aws-gd-delete-detector`
#### Input

| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| detectorId | The unique ID that specifies the detector that you want to delete. | Required |
| region | The AWS Region, if not specified the default region will be used. | Optional |
| roleArn | The Amazon Resource Name (ARN) of the role to assume. | Optional |
| roleSessionName | An identifier for the assumed role session. | Optional |
| roleSessionDuration | The duration, in seconds, of the role session. The value can range from 900 seconds (15 minutes) up to the maximum session duration setting for the role. | Optional |

#### Context Output

There is no context output for this command.

#### Command Example

```!aws-gd-delete-detector detectorId=38b1235ed3fe245279cd0c8e235db0715ac5561eb```

### aws-gd-get-detector
***
Retrieves an Amazon GuardDuty detector specified by the detectorId.

##### AWS IAM Policy Permission

Effect: _Allow_

Action: _guardduty:GetDetector_

#### Base Command

`aws-gd-get-detector`
#### Input

| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| detectorId | The unique ID of the detector that you want to retrieve. | Required |
| region | The AWS Region, if not specified the default region will be used. | Optional |
| roleArn | The Amazon Resource Name (ARN) of the role to assume. | Optional |
| roleSessionName | An identifier for the assumed role session. | Optional |
| roleSessionDuration | The duration, in seconds, of the role session. The value can range from 900 seconds (15 minutes) up to the maximum session duration setting for the role. | Optional |

#### Context Output

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| AWS.GuardDuty.Detectors.DetectorId | string | The unique ID of the created detector. |
| AWS.GuardDuty.Detectors.CreatedAt | string | The first time a resource was created. |
| AWS.GuardDuty.Detectors.ServiceRole | string | Customer serviceRole name or ARN for accessing customer resources. |
| AWS.GuardDuty.Detectors.Status | string | The status of detector. |
| AWS.GuardDuty.Detectors.UpdatedAt | string | The time a resource was last updated. |
| AWS.GuardDuty.Detectors.CloudTrailStatus | string | Describes whether CloudTrail is enabled as a data source for the detector. |
| AWS.GuardDuty.Detectors.DNSLogsStatus | string | Denotes whether DNS logs are enabled as a data source. |
| AWS.GuardDuty.Detectors.FlowLogsStatus | string | Denotes whether VPC flow logs are enabled as a data source. |
| AWS.GuardDuty.Detectors.S3LogsStatus | string | Describes whether S3 data event logs are automatically enabled for new members of the organization. |
| AWS.GuardDuty.Detectors.KubernetesAuditLogsStatus | string | Describes whether Kubernetes audit logs are enabled as a data source. |
| AWS.GuardDuty.Detectors.MalwareProtectionStatus | string | Describes whether scanning EBS volumes is enabled as a data source. |
| AWS.GuardDuty.Detectors.MalwareProtectionReason | string | Specifies the reason why scanning EBS volumes \(Malware Protection\) was not enabled as a data source. |
| AWS.GuardDuty.Detectors.Tags | string | The tags of the detector resource. |

#### Command Example

```!aws-gd-get-detector detectorId=38b1ed3fe279fdascd0c8edb071dsf5ac5561eb region=eu-west-2```

### aws-gd-update-detector
***
Updates an Amazon GuardDuty detector specified by the detectorId.

##### AWS IAM Policy Permission

Effect: _Allow_

Action: _guardduty:UpdateDetector_

#### Base Command

`aws-gd-update-detector`
#### Input

| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| detectorId | The unique ID of the detector that you want to update. | Required |
| enable | Updated boolean value for the detector that specifies whether the detector is enabled. Possible values are: True, False. Default is True. | Required |
| enableS3Logs | The status of S3 data event logs as a data source. Possible values are: True, False. | Optional |
| enableKubernetesLogs | The status of Kubernetes audit logs as a data source. Possible values are: True, False. | Optional |
| ebsVolumesMalwareProtection | Describes the configuration for scanning EBS volumes as data source. Possible values are: True, False. | Optional |
| findingFrequency | A value that specifies how frequently updated findings are exported. Possible values are: Fifteen Minutes, One Hour, Six Hours. | Optional |
| region | The AWS Region, if not specified the default region will be used. | Optional |
| roleArn | The Amazon Resource Name (ARN) of the role to assume. | Optional |
| roleSessionName | An identifier for the assumed role session. | Optional |
| roleSessionDuration | The duration, in seconds, of the role session. The value can range from 900 seconds (15 minutes) up to the maximum session duration setting for the role. | Optional |

#### Context Output

There is no context output for this command.

#### Command Example

```aws-gd-update-detector detectorId=38b1ed3fe279fdascd0c8edb071dsf5ac5561eb enable=True```

### aws-gd-create-ip-set
***
A list of trusted IP addresses on allow list for secure communication with AWS infrastructure and applications.

##### AWS IAM Policy Permission

Effect: _Allow_

Action: _guardduty:CreateIPSet_

#### Base Command

`aws-gd-create-ip-set`
#### Input

| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| activate | A boolean value that indicates whether GuardDuty is to start using the uploaded IPSet. Possible values are: True, False. Default is True. | Optional |
| detectorId | The unique ID of the detector that you want to update. | Required |
| format | The format of the file that contains the IPSet. Possible values are: TXT, STIX, OTX_CSV, ALIEN_VAULT, PROOF_POINT, FIRE_EYE. | Required |
| location | The URI of the file that contains the IPSet. For example (https://s3.us-west-2.amazonaws.com/my-bucket/my-object-key). | Optional |
| name | The user friendly name to identify the IPSet. This name is displayed in all findings that are triggered by activity that involves IP addresses included in this IPSet. | Optional |
| region | The AWS Region, if not specified the default region will be used. | Optional |
| roleArn | The Amazon Resource Name (ARN) of the role to assume. | Optional |
| roleSessionName | An identifier for the assumed role session. | Optional |
| roleSessionDuration | The duration, in seconds, of the role session. The value can range from 900 seconds (15 minutes) up to the maximum session duration setting for the role. | Optional |

#### Context Output

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| AWS.GuardDuty.Detectors.IPSet.IpSetId | unknown | The unique identifier for an IP Set. |

#### Command Example

```!aws-gd-create-ip-set format=TXT location=https://s3.eu-central-1.amazonaws.com/test/ipset.txt activate=True detectorId=38b1ed3fe279czvasdd0c8edb0715azdsfc5561eb name=test region=eu-west-2```

### aws-gd-delete-ip-set
***
Deletes the IPSet specified by the IPSet ID.

##### AWS IAM Policy Permission

Effect: _Allow_

Action: _guardduty:DeleteIPSet_

#### Base Command

`aws-gd-delete-ip-set`
#### Input

| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| detectorId | The detectorID that specifies the GuardDuty service whose IPSet you want to delete. | Required |
| ipSetId | The unique ID that specifies the IPSet that you want to delete. | Required |
| region | The AWS Region, if not specified the default region will be used. | Optional |
| roleArn | The Amazon Resource Name (ARN) of the role to assume. | Optional |
| roleSessionName | An identifier for the assumed role session. | Optional |
| roleSessionDuration | The duration, in seconds, of the role session. The value can range from 900 seconds (15 minutes) up to the maximum session duration setting for the role. | Optional |

#### Context Output

There is no context output for this command.

#### Command Example

```!aws-gd-delete-ip-set detectorId=38b1ed3fe279cd0c8edb0715ac5561eb ipSetId=7eb1f440be5931f168280b574a26d44d region=eu-west-2```

### aws-gd-list-detectors
***
Lists detectorIds of all the existing Amazon GuardDuty detector resources.

##### AWS IAM Policy Permission

Effect: _Allow_

Action: _guardduty:ListDetectors_

#### Base Command

`aws-gd-list-detectors`
#### Input

| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| limit | Number of total results to query. Default is `50`. | Optional |
| page | Specific page to query. | Optional |
| page_size | Number of total results in each page. Default is `50`. | Optional |
| region | The AWS Region, if not specified the default region will be used. | Optional |
| roleArn | The Amazon Resource Name (ARN) of the role to assume. | Optional |
| roleSessionName | An identifier for the assumed role session. | Optional |
| roleSessionDuration | The duration, in seconds, of the role session. The value can range from 900 seconds (15 minutes) up to the maximum session duration setting for the role. | Optional |

#### Context Output

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| AWS.GuardDuty.Detectors.DetectorId | string | The unique identifier for a detector. |

#### Command Example

```!aws-gd-list-detectors region=eu-west-2```

### aws-gd-update-ip-set
***
Updates the IPSet specified by the IPSet ID.

##### AWS IAM Policy Permission

Effect: _Allow_

Action: _guardduty:UpdateIPSet_

#### Base Command

`aws-gd-update-ip-set`
#### Input

| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| activate | The updated boolean value that specifies whether the IPSet is active or not. Possible values are: True, False. | Optional |
| detectorId | The detectorID that specifies the GuardDuty service whose IPSet you want to update. | Required |
| ipSetId | The unique ID that specifies the IPSet that you want to update. | Required |
| location | The updated URI of the file that contains the IPSet. For example (https://s3.us-west-2.amazonaws.com/my-bucket/my-object-key). | Optional |
| name | The user friendly name to identify the IPSet. | Optional |
| region | The AWS Region, if not specified the default region will be used. | Optional |
| roleArn | The Amazon Resource Name (ARN) of the role to assume. | Optional |
| roleSessionName | An identifier for the assumed role session. | Optional |
| roleSessionDuration | The duration, in seconds, of the role session. The value can range from 900 seconds (15 minutes) up to the maximum session duration setting for the role. | Optional |

#### Context Output

There is no context output for this command.

#### Command Example

```!aws-gd-update-ip-set detectorId=38b1ed3fe279cd0c8edb0715ac5561eb ipSetId=7eb1f440be5931f168280b574a26d44d activate=False region=eu-west-2```

### aws-gd-get-ip-set
***
Retrieves the IPSet specified by the IPSet ID.

##### AWS IAM Policy Permission

Effect: _Allow_

Action: _guardduty:GetIPSet_

#### Base Command

`aws-gd-get-ip-set`
#### Input

| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| detectorId | The detectorID that specifies the GuardDuty service whose IPSet you want to retrieve. | Required |
| ipSetId | The unique ID that specifies the IPSet that you want to describe. | Required |
| region | The AWS Region, if not specified the default region will be used. | Optional |
| roleArn | The Amazon Resource Name (ARN) of the role to assume. | Optional |
| roleSessionName | An identifier for the assumed role session. | Optional |
| roleSessionDuration | The duration, in seconds, of the role session. The value can range from 900 seconds (15 minutes) up to the maximum session duration setting for the role. | Optional |

#### Context Output

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| AWS.GuardDuty.Detectors.IPSet.IpSetId | string | The unique ID for the IPSet. |
| AWS.GuardDuty.Detectors.IPSet.Format | string | The format of the file that contains the IPSet. |
| AWS.GuardDuty.Detectors.IPSet.Location | string | The URI of the file that contains the IPSet. |
| AWS.GuardDuty.Detectors.IPSet.Name | string | he user friendly name to identify the IPSet. |
| AWS.GuardDuty.Detectors.IPSet.Status | string | The status of ipSet file uploaded. |

#### Command Example

```!aws-gd-get-ip-set detectorId=38b1ed3fesdf279cd0c8edbdsf071sdgfac5561eb ipSetId=7eb1sdff440be5931f1682adf80b574a26d44d region=eu-west-2```

### aws-gd-list-ip-sets
***
Lists the IPSets of the GuardDuty service specified by the detector ID.

##### AWS IAM Policy Permission

Effect: _Allow_

Action: _guardduty:ListIPSet_

#### Base Command

`aws-gd-list-ip-sets`
#### Input

| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| detectorId | The unique ID of the detector that you want to retrieve. | Required |
| region | The AWS Region, if not specified the default region will be used. | Optional |
| roleArn | The Amazon Resource Name (ARN) of the role to assume. | Optional |
| roleSessionName | An identifier for the assumed role session. | Optional |
| roleSessionDuration | The duration, in seconds, of the role session. The value can range from 900 seconds (15 minutes) up to the maximum session duration setting for the role. | Optional |
| limit | Number of total results to query. Default is `50`. | Optional |
| page | Specific page to query. | Optional |
| page_size | Number of total results in each page. Default is `50`. | Optional |

#### Context Output

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| AWS.GuardDuty.Detectors.IPSet.IpSetId | unknown | The unique identifier for an IP Set |

#### Command Example

```!aws-gd-list-ip-sets detectorId=38b1ed3fesdf279cd0c8edbdsf071sdgfac5561eb region=eu-west-2```

### aws-gd-create-threatintel-set
***
Create a new ThreatIntelSet. ThreatIntelSets consist of known malicious IP addresses. GuardDuty generates findings based on
ThreatIntelSets.

##### AWS IAM Policy Permission

Effect: _Allow_

Action: _guardduty:CreateThreatIntelSet_

#### Base Command

`aws-gd-create-threatintel-set`
#### Input

| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| activate | A boolean value that indicates whether GuardDuty is to start using the uploaded ThreatIntelSet. Possible values are: True, False. Default is True. | Required |
| detectorId | The unique ID of the detector that you want to update. | Required |
| format | The format of the file that contains the ThreatIntelSet. Possible values are: TXT, STIX, OTX_CSV, ALIEN_VAULT, PROOF_POINT, FIRE_EYE. | Required |
| location | The URI of the file that contains the ThreatIntelSet. For example (https://s3.us-west-2.amazonaws.com/my-bucket/my-object-key). | Required |
| name | A user-friendly ThreatIntelSet name that is displayed in all finding generated by activity that involves IP addresses included in this ThreatIntelSet. | Required |
| region | The AWS Region, if not specified the default region will be used. | Optional |
| roleArn | The Amazon Resource Name (ARN) of the role to assume. | Optional |
| roleSessionName | An identifier for the assumed role session. | Optional |
| roleSessionDuration | The duration, in seconds, of the role session. The value can range from 900 seconds (15 minutes) up to the maximum session duration setting for the role. | Optional |

#### Context Output

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| AWS.GuardDuty.Detectors.ThreatIntelSet.ThreatIntelSetId | string | The unique identifier for an threat intel set. |

#### Command Example

```!aws-gd-create-threatintel-set format=TXT location=https://s3.eu-central-1.amazonaws.com/test/threatintel.txt activate=True detectorId=38b1ed3fe279czvasdd0c8edb0715azdsfc5561eb name=test region=eu-west-2```

### aws-gd-delete-threatintel-set
***
Deletes ThreatIntelSet specified by the ThreatIntelSet ID.

##### AWS IAM Policy Permission

Effect: _Allow_

Action: _guardduty:DeleteThreatIntelSet_

#### Base Command

`aws-gd-delete-threatintel-set`
#### Input

| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| detectorId | The detectorID that specifies the GuardDuty service whose ThreatIntelSet you want to delete. | Required |
| threatIntelSetId | The unique ID that specifies the ThreatIntelSet that you want to delete. | Required |
| region | The AWS Region, if not specified the default region will be used. | Optional |
| roleArn | The Amazon Resource Name (ARN) of the role to assume. | Optional |
| roleSessionName | An identifier for the assumed role session. | Optional |
| roleSessionDuration | The duration, in seconds, of the role session. The value can range from 900 seconds (15 minutes) up to the maximum session duration setting for the role. | Optional |

#### Context Output

There is no context output for this command.

#### Command Example

```!aws-gd-delete-threatintel-set detectorId=38b1ed3fe279cd0c8edb0715ac5561eb threatIntelSetId=7eb1f440be5931f168280b574a26d44d region=eu-west-2```

### aws-gd-get-threatintel-set
***
Retrieves the ThreatIntelSet that is specified by the ThreatIntelSet ID.

##### AWS IAM Policy Permission

Effect: _Allow_

Action: _guardduty:GetThreatIntelSet_

#### Base Command

`aws-gd-get-threatintel-set`
#### Input

| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| detectorId | The detectorID that specifies the GuardDuty service whose ThreatIntelSet you want to describe. | Required |
| threatIntelSetId | The unique ID that specifies the ThreatIntelSet that you want to describe. | Required |
| region | The AWS Region, if not specified the default region will be used. | Optional |
| roleArn | The Amazon Resource Name (ARN) of the role to assume. | Optional |
| roleSessionName | An identifier for the assumed role session. | Optional |
| roleSessionDuration | The duration, in seconds, of the role session. The value can range from 900 seconds (15 minutes) up to the maximum session duration setting for the role. | Optional |

#### Context Output

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| AWS.GuardDuty.Detectors.ThreatIntelSet.ThreatIntelSetId | string | The unique ID that specifies the ThreatIntelSet. |
| AWS.GuardDuty.Detectors.ThreatIntelSet.Format | string | The format of the threatIntelSet. |
| AWS.GuardDuty.Detectors.ThreatIntelSet.Location | string | The URI of the file that contains the ThreatIntelSet. |
| AWS.GuardDuty.Detectors.ThreatIntelSet.Name | string | A user-friendly ThreatIntelSet name. |
| AWS.GuardDuty.Detectors.ThreatIntelSet.Status | string | The status of threatIntelSet file uploaded. |

#### Command Example

```!aws-gd-get-threatintel-set detectorId=38b1ed3fe279cd0c8edb0715ac5561eb threatIntelSetId=7eb1f440be5931f168280b574a26d44d region=eu-west-2```

### aws-gd-list-threatintel-sets
***
Lists the ThreatIntelSets of the GuardDuty service specified by the detector ID.

##### AWS IAM Policy Permission

Effect: _Allow_

Action: _guardduty:ListThreatIntelSet_

#### Base Command

`aws-gd-list-threatintel-sets`
#### Input

| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| detectorId | The detectorID that specifies the GuardDuty service whose ThreatIntelSets you want to list. | Required |
| region | The AWS Region, if not specified the default region will be used. | Optional |
| roleArn | The Amazon Resource Name (ARN) of the role to assume. | Optional |
| roleSessionName | An identifier for the assumed role session. | Optional |
| roleSessionDuration | The duration, in seconds, of the role session. The value can range from 900 seconds (15 minutes) up to the maximum session duration setting for the role. | Optional |
| limit | Number of total results to query. Default is `50`. | Optional |
| page | Specific page to query. | Optional |
| page_size | Number of total results in each page. Default is `50`. | Optional |

#### Context Output

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| AWS.GuardDuty.Detectors.ThreatIntelSet.ThreatIntelSetId | string | The unique identifier for an threat intel set |

#### Command Example

```!aws-gd-list-threatintel-sets detectorId=38b1ed3fe279cd0c8edb0715ac5561eb region=eu-west-2```

### aws-gd-update-threatintel-set
***
Updates the ThreatIntelSet specified by ThreatIntelSet ID.

##### AWS IAM Policy Permission

Effect: _Allow_

Action: _guardduty:UpdateThreatIntelSet_

#### Base Command

`aws-gd-update-threatintel-set`
#### Input

| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| detectorId | The detectorID that specifies the GuardDuty service whose ThreatIntelSet you want to update. | Required |
| threatIntelSetId | The unique ID that specifies the ThreatIntelSet that you want to update. | Optional |
| activate | The updated boolean value that specifies whether the ThreatIntelSet is active or not. Possible values are: True, False. | Optional |
| location | The updated URI of the file that contains the ThreatIntelSet. For example (https://s3.us-west-2.amazonaws.com/my-bucket/my-object-key). | Optional |
| name | The user-friendly ThreatIntelSet name. | Optional |
| region | The AWS Region, if not specified the default region will be used. | Optional |
| roleArn | The Amazon Resource Name (ARN) of the role to assume. | Optional |
| roleSessionName | An identifier for the assumed role session. | Optional |
| roleSessionDuration | The duration, in seconds, of the role session. The value can range from 900 seconds (15 minutes) up to the maximum session duration setting for the role. | Optional |

#### Context Output

There is no context output for this command.

#### Command Example

```!aws-gd-update-threatintel-set detectorId=38b1ed3fe279cd0c8edb0715ac5561eb threatIntelSetId=7eb1f440be5931f168280b574a26d44d activate=False region=eu-west-2```

### aws-gd-list-findings
***
Lists Amazon GuardDuty findings for the specified detector ID.

##### AWS IAM Policy Permission

Effect: _Allow_

Action: _guardduty:ListFindings_

#### Base Command

`aws-gd-list-findings`
#### Input

| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| detectorId | The ID of the detector that specifies the GuardDuty service whose findings you want to list. | Required |
| region | The AWS Region, if not specified the default region will be used. | Optional |
| roleArn | The Amazon Resource Name (ARN) of the role to assume. | Optional |
| roleSessionName | An identifier for the assumed role session. | Optional |
| roleSessionDuration | The duration, in seconds, of the role session. The value can range from 900 seconds (15 minutes) up to the maximum session duration setting for the role. | Optional |
| limit | Number of total results to query. Default is `50`. | Optional |
| page | Specific page to query. | Optional |
| page_size | Number of total results in each page. Default is `50`. | Optional |

#### Context Output

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| AWS.GuardDuty.Findings.FindingId | string | The unique identifier for the Finding |

#### Command Example

```!aws-gd-list-findings detectorId=38b1ed3fe279cd0c8edb0715ac5561eb region=eu-west-2```

### aws-gd-get-findings
***
Describes Amazon GuardDuty findings specified by finding IDs.

##### AWS IAM Policy Permission

Effect: _Allow_

Action: _guardduty:GetFindings_

#### Base Command

`aws-gd-get-findings`
#### Input

| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| detectorId | The ID of the detector that specifies the GuardDuty service whose findings you want to retrieve. | Required |
| findingIds | IDs of the findings that you want to retrieve. | Required |
| region | The AWS Region, if not specified the default region will be used. | Optional |
| roleArn | The Amazon Resource Name (ARN) of the role to assume. | Optional |
| roleSessionName | An identifier for the assumed role session. | Optional |
| roleSessionDuration | The duration, in seconds, of the role session. The value can range from 900 seconds (15 minutes) up to the maximum session duration setting for the role. | Optional |

#### Context Output

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| AWS.GuardDuty.Findings.AccountId | string | The ID of the account in which the finding was generated. |
| AWS.GuardDuty.Findings.CreatedAt | string | The time and date when the finding was created. |
| AWS.GuardDuty.Findings.Description | string | The description of the finding. |
| AWS.GuardDuty.Findings.Region | string | The region where the finding was generated. |
| AWS.GuardDuty.Findings.Id | string | The ID of the finding. |
| AWS.GuardDuty.Findings.Title | string | The title of the finding. |
| AWS.GuardDuty.Findings.Severity | string | The severity of the finding. |
| AWS.GuardDuty.Findings.Type | string | The type of finding. |
| AWS.GuardDuty.Findings.UpdatedAt | string | The time and date when the finding was last updated. |
| AWS.GuardDuty.Findings.Arn | string | The ARN of the finding. |
| AWS.GuardDuty.Findings.Confidence | string | The confidence score for the finding. |
| AWS.GuardDuty.Findings.Partition | string | The partition associated with the finding. |
| AWS.GuardDuty.Findings.ResourceType | string | The type of Amazon Web Services resource. |
| AWS.GuardDuty.Findings.SchemaVersion | string | The version of the schema used for the finding. |
| AWS.GuardDuty.Findings.Service | string | Contains additional information about the generated finding. |
| AWS.GuardDuty.Findings.Resource.AccessKeyDetails | string | The IAM access key details \(IAM user information\) of a user that engaged in the activity that prompted GuardDuty to generate a finding. |
| AWS.GuardDuty.Findings.Resource.InstanceDetails | string | The information about the EC2 instance associated with the activity that prompted GuardDuty to generate a finding. |
| AWS.GuardDuty.Findings.Resource.EksClusterDetails | string | Details about the EKS cluster involved in a Kubernetes finding. |
| AWS.GuardDuty.Findings.Resource.KubernetesDetails | string | Details about the Kubernetes user and workload involved in a Kubernetes finding. |
| AWS.GuardDuty.Findings.Resource.EbsVolumeDetails | string | Contains a list of scanned and skipped EBS volumes with details. |
| AWS.GuardDuty.Findings.Resource.EcsClusterDetails | string | Contains information about the details of the ECS Cluster. |
| AWS.GuardDuty.Findings.Resource.ContainerDetails | string | Details of a container. |
| AWS.GuardDuty.Findings.Resource.S3BucketDetails | string | Contains information on the S3 bucket. |

#### Command Example

```!aws-gd-get-findings detectorIds=4f1fc7cd7dsg26sdf4328d8dc813 findingIds=96b1ac608sdf00e5183c3dds115c36aac328b,0ab180f5801sdg954418f3806c2a45282c9```

### aws-gd-create-sample-findings
***
Generates example findings of types specified by the list of finding types. If 'NULL' is specified for findingTypes, the API
generates example findings of all supported finding types.

##### AWS IAM Policy Permission

Effect: _Allow_

Action: _guardduty:CreateSampleFindings_

#### Base Command

`aws-gd-create-sample-findings`
#### Input

| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| detectorId | The ID of the detector to create sample findings for. | Required |
| findingTypes | Types of sample findings that you want to generate. Separated by comma. | Optional |
| region | The AWS Region, if not specified the default region will be used. | Optional |
| roleArn | The Amazon Resource Name (ARN) of the role to assume. | Optional |
| roleSessionName | An identifier for the assumed role session. | Optional |
| roleSessionDuration | The duration, in seconds, of the role session. The value can range from 900 seconds (15 minutes) up to the maximum session duration setting for the role. | Optional |

#### Context Output

There is no context output for this command.

#### Command Example

```!aws-gd-create-sample-findings detectorId=4f1fc7cd7dsg2adf6sdf4328d8dc813 findingTypes=NULL region=eu-central-1```

### aws-gd-archive-findings
***
Archives Amazon GuardDuty findings specified by the list of finding IDs.

##### AWS IAM Policy Permission

Effect: _Allow_

Action: _guardduty:ArchiveFindings_

#### Base Command

`aws-gd-archive-findings`
#### Input

| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| detectorId | The ID of the detector that specifies the GuardDuty service whose findings you want to archive. | Required |
| findingIds | IDs of the findings that you want to archive. Separated by comma. | Optional |
| region | The AWS Region, if not specified the default region will be used. | Optional |
| roleArn | The Amazon Resource Name (ARN) of the role to assume. | Optional |
| roleSessionName | An identifier for the assumed role session. | Optional |
| roleSessionDuration | The duration, in seconds, of the role session. The value can range from 900 seconds (15 minutes) up to the maximum session duration setting for the role. | Optional |

#### Context Output

There is no context output for this command.

#### Command Example

```!aws-gd-archive-findings detectorIds=4f1fc7cd7dsg26sdf4328d8dc813 findingIds=96b1ac608sdf00e5183c3dds115c36aac328b,0ab180f5801sdg954418f3806c2a45282c9```

### aws-gd-unarchive-findings
***
Unarchives Amazon GuardDuty findings specified by the list of finding IDs.

##### AWS IAM Policy Permission

Effect: _Allow_

Action: _guardduty:UnarchiveFindings_

#### Base Command

`aws-gd-unarchive-findings`
#### Input

| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| detectorId | The ID of the detector that specifies the GuardDuty service whose findings you want to unarchive. | Required |
| findingIds | IDs of the findings that you want to unarchive. | Optional |

#### Context Output

There is no context output for this command.

#### Command Example

```!aws-gd-unarchive-findings detectorIds=4f1fc7cd7dsg26sdf4328d8dc813 findingIds=96b1ac608sdf00e5183c3dds115c36aac328b,0ab180f5801sdg954418f3806c2a45282c9```

### aws-gd-update-findings-feedback
***
Marks specified Amazon GuardDuty findings as useful or not useful.

##### AWS IAM Policy Permission

Effect: _Allow_

Action: _guardduty:UpdateFindingsFeedback_

#### Base Command

`aws-gd-update-findings-feedback`
#### Input

| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| detectorId | The ID of the detector that specifies the GuardDuty service whose findings you want to mark as useful or not useful. | Required |
| findingIds | IDs of the findings that you want to mark as useful or not useful. | Optional |
| comments | Additional feedback about the GuardDuty findings. | Optional |
| feedback | Specify whether the finding was useful or not. Possible values are: USEFUL, NOT_USEFUL. | Optional |
| region | The AWS Region, if not specified the default region will be used. | Optional |
| roleArn | The Amazon Resource Name (ARN) of the role to assume. | Optional |
| roleSessionName | An identifier for the assumed role session. | Optional |
| roleSessionDuration | The duration, in seconds, of the role session. The value can range from 900 seconds (15 minutes) up to the maximum session duration setting for the role. | Optional |

#### Context Output

There is no context output for this command.

#### Command Example

```!aws-gd-update-findings-feedback detectorIds=4f1fc7cd7dsg26sdf4328d8dc813 findingIds=96b1ac608sdf00e5183c3dds115c36aac328b comments=Good Job feedback=USEFUL```

### aws-gd-list-members
***
Describes Amazon GuardDuty members for the specified detector ID.

##### AWS IAM Policy Permission

Effect: _Allow_

Action: _guardduty:ListMembers_

#### Base Command

`aws-gd-list-members`
#### Input

| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| detectorId | The ID of the detector that specifies the GuardDuty service whose members you want to retrieve. | Required |
| region | The AWS Region, if not specified the default region will be used. | Optional |
| roleArn | The Amazon Resource Name (ARN) of the role to assume. | Optional |
| roleSessionName | An identifier for the assumed role session. | Optional |
| roleSessionDuration | The duration, in seconds, of the role session. The value can range from 900 seconds (15 minutes) up to the maximum session duration setting for the role. | Optional |
| limit | Number of total results to query. Default is `50`. | Optional |
| page | Specific page to query. | Optional |
| page_size | Number of total results in each page. Default is `50`. | Optional |

#### Context Output

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| AWS.GuardDuty.Members.AccountId | string | The unique account ID of the member. |
| AWS.GuardDuty.Members.DetectorId | string | The unique detector ID of the member. |
| AWS.GuardDuty.Members.MasterId | string | The unique detector ID of the master. |
| AWS.GuardDuty.Members.Email | string | The email of the member. |
| AWS.GuardDuty.Members.RelationshipStatus | string | The relationship  status of member. |
| AWS.GuardDuty.Members.InvitedAt | string | The first time a member was invited. |
| AWS.GuardDuty.Members.UpdatedAt | string | The time a member was last updated. |

#### Command Example

```!aws-gd-list-members detectorIds=4f1fc7cd7dsg26sdf4328d8dc813```

### aws-gd-get-members
***
Describes Amazon GuardDuty members for the specified detector ID & account ID.

##### AWS IAM Policy Permission

Effect: _Allow_

Action: _guardduty:GetMembers_

#### Base Command

`aws-gd-get-members`
#### Input

| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| detectorId | The ID of the detector that specifies the GuardDuty service whose members you want to retrieve. | Required |
| accountIds | The ID of the account that specifies the GuardDuty service whose details you want to retrieve. | Required |
| region | The AWS Region, if not specified the default region will be used. | Optional |
| roleArn | The Amazon Resource Name (ARN) of the role to assume. | Optional |
| roleSessionName | An identifier for the assumed role session. | Optional |
| roleSessionDuration | The duration, in seconds, of the role session. The value can range from 900 seconds (15 minutes) up to the maximum session duration setting for the role. | Optional |

#### Context Output

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| AWS.GuardDuty.Members.AccountId | string | The unique account ID of the member. |
| AWS.GuardDuty.Members.DetectorId | string | The unique detector ID of the member. |
| AWS.GuardDuty.Members.MasterId | string | The unique detector ID of the master. |
| AWS.GuardDuty.Members.Email | string | The email of the member. |
| AWS.GuardDuty.Members.RelationshipStatus | string | The relationship  status of member. |
| AWS.GuardDuty.Members.InvitedAt | string | The first time a member was invited. |
| AWS.GuardDuty.Members.UpdatedAt | string | The time a member was last updated. |

#### Command Example

```!aws-gd-get-members detectorIds=4f1fc7cd7dsg26sdf4328d8dc813 accountIds=1f3fc2cd1dag26sdf4338d8aa813```

## Breaking changes from the previous version of this integration - AWS-GuardDuty
The following sections list the changes in this version.

### Commands
Fetch incidents command - Findings that are fetched are no longer moved automatically to the GuardDuty archive.
### Parameters
The following parameters were added in this version:
- *How many incidents to fetch each time*
- *First fetch timestamp*
- *Archive findings After Fetch*


text:
#import <UIKit/UIKit.h>

#import "CSetupServerItem.h"

@interface CSetupServerTableViewCell : UITableViewCell

@property(copy, nonatomic) CSetupServerItem* server;

- (id)initWithReuseIdentifier:(NSString*)reuseIdentifier;

@end


text:
.class public final Landroid/media/session/PlaybackState$Builder;
.super Ljava/lang/Object;
.source "PlaybackState.java"

# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Landroid/media/session/PlaybackState;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x19
    name = "Builder"
.end annotation

# instance fields
.field private mActions:J

.field private mActiveItemId:J

.field private mBufferedPosition:J

.field private final mCustomActions:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List",
            "<",
            "Landroid/media/session/PlaybackState$CustomAction;",
            ">;"
        }
    .end annotation
.end field

.field private mErrorMessage:Ljava/lang/CharSequence;

.field private mExtras:Landroid/os/Bundle;

.field private mPosition:J

.field private mSpeed:F

.field private mState:I

.field private mUpdateTime:J

# direct methods
.method public constructor <init>()V
    .locals 2

    .prologue
    .line 759
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 744
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Landroid/media/session/PlaybackState$Builder;->mCustomActions:Ljava/util/List;

    .line 753
    const-wide/16 v0, -0x1

    iput-wide v0, p0, Landroid/media/session/PlaybackState$Builder;->mActiveItemId:J

    .line 760
    return-void
.end method

.method public constructor <init>(Landroid/media/session/PlaybackState;)V
    .locals 2
    .param p1, "from"    # Landroid/media/session/PlaybackState;

    .prologue
    .line 768
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 744
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Landroid/media/session/PlaybackState$Builder;->mCustomActions:Ljava/util/List;

    .line 753
    const-wide/16 v0, -0x1

    iput-wide v0, p0, Landroid/media/session/PlaybackState$Builder;->mActiveItemId:J

    .line 769
    if-nez p1, :cond_0

    .line 784
    :goto_0
    return-void

    .line 772
    :cond_0
    # getter for: Landroid/media/session/PlaybackState;->mState:I
    invoke-static {p1}, Landroid/media/session/PlaybackState;->access$300(Landroid/media/session/PlaybackState;)I

    move-result v0

    iput v0, p0, Landroid/media/session/PlaybackState$Builder;->mState:I

    .line 773
    # getter for: Landroid/media/session/PlaybackState;->mPosition:J
    invoke-static {p1}, Landroid/media/session/PlaybackState;->access$400(Landroid/media/session/PlaybackState;)J

    move-result-wide v0

    iput-wide v0, p0, Landroid/media/session/PlaybackState$Builder;->mPosition:J

    .line 774
    # getter for: Landroid/media/session/PlaybackState;->mBufferedPosition:J
    invoke-static {p1}, Landroid/media/session/PlaybackState;->access$500(Landroid/media/session/PlaybackState;)J

    move-result-wide v0

    iput-wide v0, p0, Landroid/media/session/PlaybackState$Builder;->mBufferedPosition:J

    .line 775
    # getter for: Landroid/media/session/PlaybackState;->mSpeed:F
    invoke-static {p1}, Landroid/media/session/PlaybackState;->access$600(Landroid/media/session/PlaybackState;)F

    move-result v0

    iput v0, p0, Landroid/media/session/PlaybackState$Builder;->mSpeed:F

    .line 776
    # getter for: Landroid/media/session/PlaybackState;->mActions:J
    invoke-static {p1}, Landroid/media/session/PlaybackState;->access$700(Landroid/media/session/PlaybackState;)J

    move-result-wide v0

    iput-wide v0, p0, Landroid/media/session/PlaybackState$Builder;->mActions:J

    .line 777
    # getter for: Landroid/media/session/PlaybackState;->mCustomActions:Ljava/util/List;
    invoke-static {p1}, Landroid/media/session/PlaybackState;->access$800(Landroid/media/session/PlaybackState;)Ljava/util/List;

    move-result-object v0

    if-eqz v0, :cond_1

    .line 778
    iget-object v0, p0, Landroid/media/session/PlaybackState$Builder;->mCustomActions:Ljava/util/List;

    # getter for: Landroid/media/session/PlaybackState;->mCustomActions:Ljava/util/List;
    invoke-static {p1}, Landroid/media/session/PlaybackState;->access$800(Landroid/media/session/PlaybackState;)Ljava/util/List;

    move-result-object v1

    invoke-interface {v0, v1}, Ljava/util/List;->addAll(Ljava/util/Collection;)Z

    .line 780
    :cond_1
    # getter for: Landroid/media/session/PlaybackState;->mErrorMessage:Ljava/lang/CharSequence;
    invoke-static {p1}, Landroid/media/session/PlaybackState;->access$900(Landroid/media/session/PlaybackState;)Ljava/lang/CharSequence;

    move-result-object v0

    iput-object v0, p0, Landroid/media/session/PlaybackState$Builder;->mErrorMessage:Ljava/lang/CharSequence;

    .line 781
    # getter for: Landroid/media/session/PlaybackState;->mUpdateTime:J
    invoke-static {p1}, Landroid/media/session/PlaybackState;->access$1000(Landroid/media/session/PlaybackState;)J

    move-result-wide v0

    iput-wide v0, p0, Landroid/media/session/PlaybackState$Builder;->mUpdateTime:J

    .line 782
    # getter for: Landroid/media/session/PlaybackState;->mActiveItemId:J
    invoke-static {p1}, Landroid/media/session/PlaybackState;->access$1100(Landroid/media/session/PlaybackState;)J

    move-result-wide v0

    iput-wide v0, p0, Landroid/media/session/PlaybackState$Builder;->mActiveItemId:J

    .line 783
    # getter for: Landroid/media/session/PlaybackState;->mExtras:Landroid/os/Bundle;
    invoke-static {p1}, Landroid/media/session/PlaybackState;->access$1200(Landroid/media/session/PlaybackState;)Landroid/os/Bundle;

    move-result-object v0

    iput-object v0, p0, Landroid/media/session/PlaybackState$Builder;->mExtras:Landroid/os/Bundle;

    goto :goto_0
.end method

# virtual methods
.method public addCustomAction(Landroid/media/session/PlaybackState$CustomAction;)Landroid/media/session/PlaybackState$Builder;
    .locals 2
    .param p1, "customAction"    # Landroid/media/session/PlaybackState$CustomAction;

    .prologue
    .line 919
    if-nez p1, :cond_0

    .line 920
    new-instance v0, Ljava/lang/IllegalArgumentException;

    const-string v1, "You may not add a null CustomAction to PlaybackState."

    invoke-direct {v0, v1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V

    throw v0

    .line 923
    :cond_0
    iget-object v0, p0, Landroid/media/session/PlaybackState$Builder;->mCustomActions:Ljava/util/List;

    invoke-interface {v0, p1}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 924
    return-object p0
.end method

.method public addCustomAction(Ljava/lang/String;Ljava/lang/String;I)Landroid/media/session/PlaybackState$Builder;
    .locals 6
    .param p1, "action"    # Ljava/lang/String;
    .param p2, "name"    # Ljava/lang/String;
    .param p3, "icon"    # I

    .prologue
    const/4 v4, 0x0

    .line 904
    new-instance v0, Landroid/media/session/PlaybackState$CustomAction;

    move-object v1, p1

    move-object v2, p2

    move v3, p3

    move-object v5, v4

    invoke-direct/range {v0 .. v5}, Landroid/media/session/PlaybackState$CustomAction;-><init>(Ljava/lang/String;Ljava/lang/CharSequence;ILandroid/os/Bundle;Landroid/media/session/PlaybackState$1;)V

    invoke-virtual {p0, v0}, Landroid/media/session/PlaybackState$Builder;->addCustomAction(Landroid/media/session/PlaybackState$CustomAction;)Landroid/media/session/PlaybackState$Builder;

    move-result-object v0

    return-object v0
.end method

.method public build()Landroid/media/session/PlaybackState;
    .locals 19

    .prologue
    .line 983
    new-instance v2, Landroid/media/session/PlaybackState;

    move-object/from16 v0, p0

    iget v3, v0, Landroid/media/session/PlaybackState$Builder;->mState:I

    move-object/from16 v0, p0

    iget-wide v4, v0, Landroid/media/session/PlaybackState$Builder;->mPosition:J

    move-object/from16 v0, p0

    iget-wide v6, v0, Landroid/media/session/PlaybackState$Builder;->mUpdateTime:J

    move-object/from16 v0, p0

    iget v8, v0, Landroid/media/session/PlaybackState$Builder;->mSpeed:F

    move-object/from16 v0, p0

    iget-wide v9, v0, Landroid/media/session/PlaybackState$Builder;->mBufferedPosition:J

    move-object/from16 v0, p0

    iget-wide v11, v0, Landroid/media/session/PlaybackState$Builder;->mActions:J

    move-object/from16 v0, p0

    iget-object v13, v0, Landroid/media/session/PlaybackState$Builder;->mCustomActions:Ljava/util/List;

    move-object/from16 v0, p0

    iget-wide v14, v0, Landroid/media/session/PlaybackState$Builder;->mActiveItemId:J

    move-object/from16 v0, p0

    iget-object v0, v0, Landroid/media/session/PlaybackState$Builder;->mErrorMessage:Ljava/lang/CharSequence;

    move-object/from16 v16, v0

    move-object/from16 v0, p0

    iget-object v0, v0, Landroid/media/session/PlaybackState$Builder;->mExtras:Landroid/os/Bundle;

    move-object/from16 v17, v0

    const/16 v18, 0x0

    invoke-direct/range {v2 .. v18}, Landroid/media/session/PlaybackState;-><init>(IJJFJJLjava/util/List;JLjava/lang/CharSequence;Landroid/os/Bundle;Landroid/media/session/PlaybackState$1;)V

    return-object v2
.end method

.method public setActions(J)Landroid/media/session/PlaybackState$Builder;
    .locals 1
    .param p1, "actions"    # J

    .prologue
    .line 879
    iput-wide p1, p0, Landroid/media/session/PlaybackState$Builder;->mActions:J

    .line 880
    return-object p0
.end method

.method public setActiveQueueItemId(J)Landroid/media/session/PlaybackState$Builder;
    .locals 1
    .param p1, "id"    # J

    .prologue
    .line 949
    iput-wide p1, p0, Landroid/media/session/PlaybackState$Builder;->mActiveItemId:J

    .line 950
    return-object p0
.end method

.method public setBufferedPosition(J)Landroid/media/session/PlaybackState$Builder;
    .locals 1
    .param p1, "bufferedPosition"    # J

    .prologue
    .line 937
    iput-wide p1, p0, Landroid/media/session/PlaybackState$Builder;->mBufferedPosition:J

    .line 938
    return-object p0
.end method

.method public setErrorMessage(Ljava/lang/CharSequence;)Landroid/media/session/PlaybackState$Builder;
    .locals 0
    .param p1, "error"    # Ljava/lang/CharSequence;

    .prologue
    .line 961
    iput-object p1, p0, Landroid/media/session/PlaybackState$Builder;->mErrorMessage:Ljava/lang/CharSequence;

    .line 962
    return-object p0
.end method

.method public setExtras(Landroid/os/Bundle;)Landroid/media/session/PlaybackState$Builder;
    .locals 0
    .param p1, "extras"    # Landroid/os/Bundle;

    .prologue
    .line 972
    iput-object p1, p0, Landroid/media/session/PlaybackState$Builder;->mExtras:Landroid/os/Bundle;

    .line 973
    return-object p0
.end method

.method public setState(IJF)Landroid/media/session/PlaybackState$Builder;
    .locals 8
    .param p1, "state"    # I
    .param p2, "position"    # J
    .param p4, "playbackSpeed"    # F

    .prologue
    .line 857
    invoke-static {}, Landroid/os/SystemClock;->elapsedRealtime()J

    move-result-wide v5

    move-object v0, p0

    move v1, p1

    move-wide v2, p2

    move v4, p4

    invoke-virtual/range {v0 .. v6}, Landroid/media/session/PlaybackState$Builder;->setState(IJFJ)Landroid/media/session/PlaybackState$Builder;

    move-result-object v0

    return-object v0
.end method

.method public setState(IJFJ)Landroid/media/session/PlaybackState$Builder;
    .locals 0
    .param p1, "state"    # I
    .param p2, "position"    # J
    .param p4, "playbackSpeed"    # F
    .param p5, "updateTime"    # J

    .prologue
    .line 820
    iput p1, p0, Landroid/media/session/PlaybackState$Builder;->mState:I

    .line 821
    iput-wide p2, p0, Landroid/media/session/PlaybackState$Builder;->mPosition:J

    .line 822
    iput-wide p5, p0, Landroid/media/session/PlaybackState$Builder;->mUpdateTime:J

    .line 823
    iput p4, p0, Landroid/media/session/PlaybackState$Builder;->mSpeed:F

    .line 824
    return-object p0
.end method